private static class WebSocketTransport.ClientSockJsWebSocketHandler extends TextWebSocketHandler
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicInteger |
connectCount |
private WebSocketClientSockJsSession |
sockJsSession |
Modifier | Constructor and Description |
---|---|
private |
ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session) |
Modifier and Type | Method and Description |
---|---|
void |
afterConnectionClosed(WebSocketSession webSocketSession,
CloseStatus status)
Invoked after the WebSocket connection has been closed by either side, or after a
transport error has occurred.
|
void |
afterConnectionEstablished(WebSocketSession webSocketSession)
Invoked after WebSocket negotiation has succeeded and the WebSocket connection is
opened and ready for use.
|
void |
handleTextMessage(WebSocketSession webSocketSession,
TextMessage message) |
void |
handleTransportError(WebSocketSession webSocketSession,
java.lang.Throwable ex)
Handle an error from the underlying WebSocket message transport.
|
handleBinaryMessage
handleMessage, handlePongMessage, supportsPartialMessages
private final WebSocketClientSockJsSession sockJsSession
private final java.util.concurrent.atomic.AtomicInteger connectCount
private ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session)
public void afterConnectionEstablished(WebSocketSession webSocketSession) throws java.lang.Exception
WebSocketHandler
afterConnectionEstablished
in interface WebSocketHandler
afterConnectionEstablished
in class AbstractWebSocketHandler
java.lang.Exception
- this method can handle or propagate exceptions; see class-level
Javadoc for details.public void handleTextMessage(WebSocketSession webSocketSession, TextMessage message) throws java.lang.Exception
handleTextMessage
in class AbstractWebSocketHandler
java.lang.Exception
public void handleTransportError(WebSocketSession webSocketSession, java.lang.Throwable ex) throws java.lang.Exception
WebSocketHandler
handleTransportError
in interface WebSocketHandler
handleTransportError
in class AbstractWebSocketHandler
java.lang.Exception
- this method can handle or propagate exceptions; see class-level
Javadoc for details.public void afterConnectionClosed(WebSocketSession webSocketSession, CloseStatus status) throws java.lang.Exception
WebSocketHandler
afterConnectionClosed
in interface WebSocketHandler
afterConnectionClosed
in class AbstractWebSocketHandler
java.lang.Exception
- this method can handle or propagate exceptions; see class-level
Javadoc for details.