Package org.eclipse.jetty.websocket.api
Interface WebSocketConnectionListener
-
- All Known Subinterfaces:
WebSocketFrameListener
,WebSocketListener
,WebSocketPartialListener
,WebSocketPingPongListener
- All Known Implementing Classes:
NoOpEndpoint
,WebSocketAdapter
@Deprecated(since="2021-05-27") public interface WebSocketConnectionListener
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Core WebSocket Connection Listener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
onWebSocketClose(int statusCode, String reason)
Deprecated.A Close Event was received.void
onWebSocketConnect(Session session)
Deprecated.A WebSocketSession
has connected successfully and is ready to be used.void
onWebSocketError(Throwable cause)
Deprecated.A WebSocket exception has occurred.
-
-
-
Method Detail
-
onWebSocketClose
void onWebSocketClose(int statusCode, String reason)
Deprecated.A Close Event was received.The underlying Connection will be considered closed at this point.
- Parameters:
statusCode
- the close status code. (SeeStatusCode
)reason
- the optional reason for the close.
-
onWebSocketConnect
void onWebSocketConnect(Session session)
Deprecated.A WebSocketSession
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
- Parameters:
session
- the websocket session.
-
onWebSocketError
void onWebSocketError(Throwable cause)
Deprecated.A WebSocket exception has occurred.This is a way for the internal implementation to notify of exceptions occurred 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.- Parameters:
cause
- the error that occurred.
-
-