Interface MessageChannel

All Known Implementing Classes:
WebSocketChannel

public interface MessageChannel
Interface representing the channel used by the backend to send messages down to the client (the websocket).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the message channel
    Returns the view group identifier, which is used to differentiate between different instances of the same project .
    Returns the name of the project, which is unique.
    boolean
     
    boolean
     
    void
    send(String protocol, String payload)
    Sends a message to be handled by the appropriate handler (as identified by the protocol)
  • Method Details

    • getProject

      String getProject()
      Returns the name of the project, which is unique.
    • getPageId

      String getPageId()
      Returns the view group identifier, which is used to differentiate between different instances of the same project . For a live project running in a browser, this might be the unique browser tab identifier. For a designer, this may be a specific workspace tab.
    • isOpen

      boolean isOpen()
      Returns:
      false if the message channel not connected
    • isClosed

      boolean isClosed()
      Returns:
      true iff this channel was closed by the local side of this connection (in order words: from a call to close()
    • send

      void send(String protocol, String payload) throws IOException
      Sends a message to be handled by the appropriate handler (as identified by the protocol)
      Throws:
      IOException
    • close

      void close()
      Close the message channel