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 boolean
allowInert
(UI ui, elemental.json.JsonObject invocationJson) Specifies whether inert status should be ignored for an RPC invocation or not.protected static int
getNodeId
(elemental.json.JsonObject invocationJson) Handles RPC datainvocationJson
usingui
as a context.handleNode
(StateNode node, elemental.json.JsonObject invocationJson) Handle the RPC datainvocationJson
using targetnode
as 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
-
Constructor Details
-
AbstractRpcInvocationHandler
public AbstractRpcInvocationHandler()
-
-
Method Details
-
handle
Description copied from interface:RpcInvocationHandler
Handles RPC datainvocationJson
usingui
as a context.- Specified by:
handle
in interfaceRpcInvocationHandler
- Parameters:
ui
- the UI to handle against, notnull
invocationJson
- the RPC data to handle, notnull
- Returns:
- an optional runnable
-
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.
-
handleNode
protected abstract Optional<Runnable> handleNode(StateNode node, elemental.json.JsonObject invocationJson) Handle the RPC datainvocationJson
using targetnode
as a context.- Parameters:
node
- node to handle invocation with, notnull
invocationJson
- the RPC data to handle, notnull
- Returns:
- an optional runnable
-
getNodeId
protected static int getNodeId(elemental.json.JsonObject invocationJson)
-