Interface IWebSocketRequestHandler

All Superinterfaces:
ILoggableRequestHandler, IPageClassRequestHandler, IPageRequestHandler, IPartialPageRequestHandler, IRequestHandler
All Known Implementing Classes:
WebSocketRequestHandler

An interface for outbound communication with web socket clients
Since:
6.0
  • Method Details

    • push

      void push(CharSequence message)
      Pushes a text message to the client.
      Parameters:
      message - the text message to push to the client if the web socket connection is open
    • pushAsync

      Pushes a text message to the client in an asynchronous way.
      Parameters:
      message - the text message to push to the client if the web socket connection is open
      Returns:
      a Future representing the send operation. Or null if connection is closed.
    • pushAsync

      Future<Void> pushAsync(CharSequence message, long timeout)
      Pushes a text message to the client in an asynchronous way.
      Parameters:
      message - the text message to push to the client if the web socket connection is open
      timeout - the timeout for operation
      Returns:
      a Future representing the send operation. Or null if connection is closed.
    • push

      void push(byte[] message, int offset, int length)
      Pushes a binary message to the client.
      Parameters:
      message - the binary message to push to the client if the web socket connection is open
      offset - the offset to start to read from the message
      length - how many bytes to read from the message
    • pushAsync

      Future<Void> pushAsync(byte[] message, int offset, int length)
      Pushes a binary message to the client.
      Parameters:
      message - the binary message to push to the client if the web socket connection is open
      offset - the offset to start to read from the message
      length - how many bytes to read from the message
      Returns:
      a Future representing the send operation. Or null if connection is closed.
    • pushAsync

      Future<Void> pushAsync(byte[] message, int offset, int length, long timeout)
      Pushes a binary message to the client.
      Parameters:
      message - the binary message to push to the client if the web socket connection is open
      offset - the offset to start to read from the message
      length - how many bytes to read from the message
      timeout - the timeout for operation
      Returns:
      a Future representing the send operation. Or null if connection is closed.