WebSocketFrameListener, WebSocketListener, WebSocketPartialListener, WebSocketPingPongListenerWebSocketAdapterpublic interface WebSocketConnectionListener
| Modifier and Type | Method | Description |
|---|---|---|
void |
onWebSocketClose(int statusCode,
java.lang.String reason) |
A Close Event was received.
|
void |
onWebSocketConnect(Session session) |
A WebSocket
Session has connected successfully and is ready to be used. |
void |
onWebSocketError(java.lang.Throwable cause) |
A WebSocket exception has occurred.
|
void onWebSocketClose(int statusCode,
java.lang.String reason)
The underlying Connection will be considered closed at this point.
statusCode - the close status code. (See StatusCode)reason - the optional reason for the close.void onWebSocketConnect(Session session)
Session has connected successfully and is ready to be used.
Note: It is a good idea to track this session as a field in your object so that you can write messages back via the RemoteEndpoint
session - the websocket session.void onWebSocketError(java.lang.Throwable cause)
This is a way for the internal implementation to notify of exceptions occured during the processing of websocket.
Usually this occurs from bad / malformed incoming packets. (example: bad UTF8 data, frames that are too big, violations of the spec)
This will result in the Session being closed by the implementing side.
cause - the error that occurred.Copyright © 1995–2018 Webtide. All rights reserved.