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 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 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, not null
    • 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, not null
      Returns:
      this channel registration, for chaining