public class WebSocketConnectionHandler extends java.lang.Object implements IWebSocketConnectionHandler
CLOSE_CANNOT_CONNECT, CLOSE_CONNECTION_LOST, CLOSE_INTERNAL_ERROR, CLOSE_NORMAL, CLOSE_PROTOCOL_ERROR, CLOSE_RECONNECT, CLOSE_SERVER_ERROR| Constructor and Description |
|---|
WebSocketConnectionHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(int code,
java.lang.String reason)
Fired when the WebSockets connection has deceased (or could
not established in the first place).
|
void |
onConnect(ConnectionResponse response) |
void |
onMessage(byte[] payload,
boolean isBinary) |
void |
onMessage(java.lang.String payload) |
void |
onOpen()
Fired when the WebSockets connection has been established.
|
void |
onPing() |
void |
onPing(byte[] payload) |
void |
onPong() |
void |
onPong(byte[] payload) |
void |
setConnection(WebSocketConnection connection) |
public void onConnect(ConnectionResponse response)
onConnect in interface IWebSocketConnectionHandlerpublic void onOpen()
onOpen in interface IWebSocketConnectionHandlerpublic void onClose(int code,
java.lang.String reason)
onClose in interface IWebSocketConnectionHandlercode - Close code.reason - Close reason (human-readable).public void onMessage(java.lang.String payload)
onMessage in interface IWebSocketConnectionHandlerpublic void onMessage(byte[] payload,
boolean isBinary)
onMessage in interface IWebSocketConnectionHandlerpublic void onPing()
onPing in interface IWebSocketConnectionHandlerpublic void onPing(byte[] payload)
onPing in interface IWebSocketConnectionHandlerpublic void onPong()
onPong in interface IWebSocketConnectionHandlerpublic void onPong(byte[] payload)
onPong in interface IWebSocketConnectionHandlerpublic void setConnection(WebSocketConnection connection)
setConnection in interface IWebSocketConnectionHandler