com.vaadin.flow.internal.nodefeature.
Interface ReturnChannelRegistration
All Superinterfaces:
A registration for a return channel. A new return channel can be registered
for a state node using
ReturnChannelMap.registerChannel(com.vaadin.flow.function.SerializableConsumer)
.
The registration can be passed as a parameter to various
executeJavaScript
methods and will be represented on the client
as a function that calls the registered handler.
For internal use only. May be renamed or removed in a future release.
Since:
2.0
Author:
Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the id that identifies this channel within its state node.
Gets the setting for whether this channel will receive updates in case the state node is disabled.
int
Gets the id of the state node to which the return channel belongs.
void
invoke
(elemental.json.JsonArray arguments) Invokes the channel handler with the give arguments.
setDisabledUpdateMode
(DisabledUpdateMode disabledUpdateMode) Sets whether this channel will receive updates in case the state node is disabled.
Methods inherited from interface com.vaadin.flow.shared.Registration
remove
-
Method Details
-
getStateNodeId
int getStateNodeId()Gets the id of the state node to which the return channel belongs.
Returns:
the state node id
-
getChannelId
int getChannelId()Gets the id that identifies this channel within its state node.
Returns:
the channel id
-
invoke
void invoke(elemental.json.JsonArray arguments) Invokes the channel handler with the give arguments.
Parameters:
arguments
- a JSON array containing passed from the client, notnull
-
getDisabledUpdateMode
DisabledUpdateMode getDisabledUpdateMode()Gets the setting for whether this channel will receive updates in case the state node is disabled. By default, updates are allowed only when the state node is enabled.
Returns:
the disabled update mode, not
null
-
setDisabledUpdateMode
Sets whether this channel will receive updates in case the state node is disabled.
Parameters:
disabledUpdateMode
- the disabled update mode to use, notnull
Returns:
this channel registration, for chaining
-