Class AbstractRpcInvocationHandler
- java.lang.Object
-
- com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler
-
- All Implemented Interfaces:
RpcInvocationHandler,Serializable
- Direct Known Subclasses:
AttachExistingElementRpcHandler,AttachTemplateChildRpcHandler,EventRpcHandler,MapSyncRpcHandler,PublishedServerEventHandlerRpcHandler,ReturnChannelHandler
public abstract class AbstractRpcInvocationHandler extends Object implements RpcInvocationHandler
Abstract invocation handler implementation with common methods.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractRpcInvocationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanallowInert(StateNode node)protected booleanallowInvocationWhileInert(UI ui, elemental.json.JsonObject invocationJson)Specifies whether RPC invocations are allowed while the node is inert.Optional<Runnable>handle(UI ui, elemental.json.JsonObject invocationJson)Handles RPC datainvocationJsonusinguias a context.protected abstract Optional<Runnable>handleNode(StateNode node, elemental.json.JsonObject invocationJson)Handle the RPC datainvocationJsonusing targetnodeas a context.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.server.communication.rpc.RpcInvocationHandler
getRpcType
-
-
-
-
Method Detail
-
handle
public Optional<Runnable> handle(UI ui, elemental.json.JsonObject invocationJson)
Description copied from interface:RpcInvocationHandlerHandles RPC datainvocationJsonusinguias a context.- Specified by:
handlein interfaceRpcInvocationHandler- Parameters:
ui- the UI to handle against, notnullinvocationJson- the RPC data to handle, notnull- Returns:
- an optional runnable
-
allowInvocationWhileInert
protected boolean allowInvocationWhileInert(UI ui, elemental.json.JsonObject invocationJson)
Specifies whether RPC invocations are allowed while the node is inert. The default behaviour checks the validity of the polling invocations on theui.- Parameters:
ui- the UI instance that RPC invocation originated from.invocationJson- the JsonObject containing invocation properties.- Returns:
- a boolean indicating that the whether the current invocation is allowed for the ui while the node is inert.
-
allowInert
protected boolean allowInert(StateNode node)
-
handleNode
protected abstract Optional<Runnable> handleNode(StateNode node, elemental.json.JsonObject invocationJson)
Handle the RPC datainvocationJsonusing targetnodeas a context.- Parameters:
node- node to handle invocation with, notnullinvocationJson- the RPC data to handle, notnull- Returns:
- an optional runnable
-
-