Interface ReturnChannelRegistration
-
- All Superinterfaces:
Registration
,Serializable
public interface ReturnChannelRegistration extends Registration
A registration for a return channel. A new return channel can be registered for a state node usingReturnChannelMap.registerChannel(com.vaadin.flow.function.SerializableConsumer)
. The registration can be passed as a parameter to variousexecuteJavaScript
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getChannelId()
Gets the id that identifies this channel within its state node.DisabledUpdateMode
getDisabledUpdateMode()
Gets the setting for whether this channel will receive updates in case the state node is disabled.int
getStateNodeId()
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.ReturnChannelRegistration
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 Detail
-
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
ReturnChannelRegistration setDisabledUpdateMode(DisabledUpdateMode disabledUpdateMode)
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
-
-