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
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanallowInert(UI ui, tools.jackson.databind.JsonNode invocationJson) Specifies whether inert status should be ignored for an RPC invocation or not.protected static StringdescribeTarget(StateNode node) Describes the target of an RPC invocation so that an application developer can tell which part of the application it relates to.protected static intgetNodeId(tools.jackson.databind.JsonNode invocationJson) Handles RPC datainvocationJsonusinguias a context.handleNode(StateNode node, tools.jackson.databind.JsonNode 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, waitMethods inherited from interface com.vaadin.flow.server.communication.rpc.RpcInvocationHandler
getRpcType
-
Constructor Details
-
AbstractRpcInvocationHandler
public AbstractRpcInvocationHandler()
-
-
Method Details
-
handle
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
-
describeTarget
Describes the target of an RPC invocation so that an application developer can tell which part of the application it relates to. In addition to the state node id, the description contains the element tag and, when available, the component class and the routing target that the component is used in.- Parameters:
node- the target node, may benull- Returns:
- a description of the target, not
null - Since:
- 25.3
-
allowInert
Specifies whether inert status should be ignored for an RPC invocation or not. The default behaviour is to let the polling events be handled, while ignoring other requests.- Parameters:
ui- the UI instance that RPC invocation originated from.invocationJson- the JsonObject containing invocation properties.- Returns:
- a boolean indicating that the inert status should be ignored for the current invocation or not.
- Since:
- 25.0
-
handleNode
protected abstract Optional<Runnable> handleNode(StateNode node, tools.jackson.databind.JsonNode 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
- Since:
- 25.0
-
getNodeId
protected static int getNodeId(tools.jackson.databind.JsonNode invocationJson)
-