Interface ServerWebsocketSession
public interface ServerWebsocketSession
Minimal server-side WebSocket session contract used by the in-memory Fluxzero test server.
-
Method Summary
Modifier and TypeMethodDescriptionvoidabort(io.fluxzero.sdk.common.websocket.WebsocketCloseReason closeReason) Terminates the connection without waiting for a close handshake.voidclose()Closes the session normally.voidclose(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.booleanisOpen()Returns whether the underlying transport still accepts frames.voidsendBinary(ByteBuffer data) Sends a complete binary message.voidsendPing(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
-
getRequestHeaders
-
getUserProperties
-
isOpen
boolean isOpen()Returns whether the underlying transport still accepts frames. -
sendBinary
Sends a complete binary message.- Throws:
IOException
-
sendPing
Sends a ping frame with optional application data.- Throws:
IOException
-
close
-
close
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.
-