Interface WebsocketConnection

All Superinterfaces:
AttributeAware

public interface WebsocketConnection extends AttributeAware
Interface for a websocket connection.
Since:
1
Version:
1
  • Method Details

    • getId

      String getId()
      Return the connection id.
      Returns:
      the unique connection id
      Since:
      1
    • sendMessage

      void sendMessage(String msg)
      Send a message to the associated client.
      Parameters:
      msg - the message to send
      Since:
      1
    • close

      void close()
      Close the connection.
      Since:
      1
    • getRemoteAddr

      InetSocketAddress getRemoteAddr()
      Return the client ip address for the websocket.
      Returns:
      the client address
      Since:
      1
    • getMsgHandler

      WebsocketMsgHandler getMsgHandler()
      Return the registered message handler.
      Since:
      1
    • setMsgHandler

      void setMsgHandler(WebsocketMsgHandler handler)
      Set the message handler to use for incoming messages.
      Since:
      1