-
-
Method Summary
Modifier and Type Method Description void
onConnect(@NotNull() WsConnectHandler wsConnectHandler)
Add a WsConnectHandler to the WsHandler.The handler is called when a WebSocket client connects. void
onMessage(@NotNull() WsMessageHandler wsMessageHandler)
Add a WsMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa String message. void
onBinaryMessage(@NotNull() WsBinaryMessageHandler wsBinaryMessageHandler)
Add a WsBinaryMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa binary message. void
onClose(@NotNull() WsCloseHandler wsCloseHandler)
Add a WsCloseHandler to the WsHandler.The handler is called when a WebSocket client closesthe connection. void
onError(@NotNull() WsErrorHandler wsErrorHandler)
Add a wsErrorHandler to the WsHandler.The handler is called when an error is detected. -
-
Method Detail
-
onConnect
void onConnect(@NotNull() WsConnectHandler wsConnectHandler)
Add a WsConnectHandler to the WsHandler.The handler is called when a WebSocket client connects.
-
onMessage
void onMessage(@NotNull() WsMessageHandler wsMessageHandler)
Add a WsMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa String message.
-
onBinaryMessage
void onBinaryMessage(@NotNull() WsBinaryMessageHandler wsBinaryMessageHandler)
Add a WsBinaryMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa binary message.
-
onClose
void onClose(@NotNull() WsCloseHandler wsCloseHandler)
Add a WsCloseHandler to the WsHandler.The handler is called when a WebSocket client closesthe connection. The handler is not called in case ofnetwork issues, only when the client actively closes theconnection (or times out).
-
onError
void onError(@NotNull() WsErrorHandler wsErrorHandler)
Add a wsErrorHandler to the WsHandler.The handler is called when an error is detected.
-
-
-
-