Uses of Interface
io.jooby.WebSocket
-
Uses of WebSocket in io.jooby
Modifier and TypeMethodDescriptiondefault WebSocket
Set an application attribute.default WebSocket
WebSocket.close()
Close the web socket and send aWebSocketCloseStatus.NORMAL
code to client.WebSocket.close
(WebSocketCloseStatus closeStatus) Close the web socket and send a close status code to client.default WebSocket
Encode a value and send a text message to client.WebSocket.render
(Object value, WebSocket.WriteCallback callback) Encode a value and send a text message to client.default WebSocket
WebSocket.renderBinary
(Object value) Encode a value and send a binary message to client.WebSocket.renderBinary
(Object value, WebSocket.WriteCallback callback) Encode a value and send a binary message to client.default WebSocket
WebSocket.send
(byte[] message) Send a text message to client.default WebSocket
WebSocket.send
(byte[] message, WebSocket.WriteCallback callback) Send a text message to client.default WebSocket
WebSocket.send
(DataBuffer message) WebSocket.send
(DataBuffer message, WebSocket.WriteCallback callback) default WebSocket
Send a text message to client.WebSocket.send
(String message, WebSocket.WriteCallback callback) Send a text message to client.default WebSocket
WebSocket.send
(ByteBuffer message) WebSocket.send
(ByteBuffer message, WebSocket.WriteCallback callback) default WebSocket
WebSocket.sendBinary
(byte[] message) Send a binary message to client.default WebSocket
WebSocket.sendBinary
(byte[] message, WebSocket.WriteCallback callback) Send a binary message to client.default WebSocket
WebSocket.sendBinary
(DataBuffer message) WebSocket.sendBinary
(DataBuffer message, WebSocket.WriteCallback callback) default WebSocket
WebSocket.sendBinary
(String message) Send a binary message to client.WebSocket.sendBinary
(String message, WebSocket.WriteCallback callback) Send a binary message to client.default WebSocket
WebSocket.sendBinary
(ByteBuffer message) WebSocket.sendBinary
(ByteBuffer message, WebSocket.WriteCallback callback) Modifier and TypeMethodDescriptionWebSocket.getSessions()
Web sockets connected to the same path.Modifier and TypeMethodDescriptionvoid
WebSocket.OnClose.onClose
(WebSocket ws, WebSocketCloseStatus closeStatus) Generated when client close the connection or when explicit calls toclose(WebSocketCloseStatus)
.void
On connect callback with recently created web socket.void
Error callback, let you listen for exception.void
WebSocket.OnMessage.onMessage
(WebSocket ws, WebSocketMessage message) Generated when a client send a message.void
WebSocket.WriteCallback.operationComplete
(WebSocket ws, Throwable cause) Notify about message sent to client.static Context
Context.websocket
(Context ctx, WebSocket ws, boolean binary, WebSocket.WriteCallback callback) Wrap a HTTP context and make it WebSocket friendly.Modifier and TypeMethodDescriptionvoid
WebSocket.forEach
(SneakyThrows.Consumer<WebSocket> callback) For each of live sessions (including this) do something with it.