Interface ServerWebsocketSession


public interface ServerWebsocketSession
Minimal server-side WebSocket session contract used by the in-memory Fluxzero test server.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    abort(io.fluxzero.sdk.common.websocket.WebsocketCloseReason closeReason)
    Terminates the connection without waiting for a close handshake.
    void
    Closes the session normally.
    void
    close(io.fluxzero.sdk.common.websocket.WebsocketCloseReason closeReason)
    Closes the session with the provided WebSocket close code and reason.
    Returns the headers from the WebSocket upgrade request.
    Returns the decoded query parameters from the WebSocket upgrade request.
    Returns the URI that was used for the WebSocket upgrade request.
    Returns per-session attributes derived during the WebSocket handshake.
    boolean
    Returns whether the underlying transport still accepts frames.
    void
    Sends a complete binary message.
    void
    sendPing(ByteBuffer applicationData)
    Sends a ping frame with optional application data.
  • Method Details

    • getRequestURI

      URI getRequestURI()
      Returns the URI that was used for the WebSocket upgrade request.
    • getRequestParameterMap

      Map<String, List<String>> getRequestParameterMap()
      Returns the decoded query parameters from the WebSocket upgrade request.
    • getRequestHeaders

      Map<String, List<String>> getRequestHeaders()
      Returns the headers from the WebSocket upgrade request.
    • getUserProperties

      Map<String,Object> getUserProperties()
      Returns per-session attributes derived during the WebSocket handshake.
    • isOpen

      boolean isOpen()
      Returns whether the underlying transport still accepts frames.
    • sendBinary

      void sendBinary(ByteBuffer data) throws IOException
      Sends a complete binary message.
      Throws:
      IOException
    • sendPing

      void sendPing(ByteBuffer applicationData) throws IOException
      Sends a ping frame with optional application data.
      Throws:
      IOException
    • close

      void close() throws IOException
      Closes the session normally.
      Throws:
      IOException
    • close

      void close(io.fluxzero.sdk.common.websocket.WebsocketCloseReason closeReason) throws IOException
      Closes the session with the provided WebSocket close code and reason.
      Throws:
      IOException
    • abort

      void abort(io.fluxzero.sdk.common.websocket.WebsocketCloseReason closeReason)
      Terminates the connection without waiting for a close handshake.