WebSocketHandlerDecorator.
Traps all Throwable instances that escape from the decorated
handler and closes the session with CloseStatus#SERVER_ERROR.
| Access | Constructor and Description |
|---|---|
| public |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| ExceptionWebSocketHandlerDecorator | back to summary |
|---|---|
| public ExceptionWebSocketHandlerDecorator(WebSocketHandler delegate) | |
| afterConnectionClosed | back to summary |
|---|---|
| public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) Overrides org. Implements org. Doc from org. Invoked after the WebSocket connection has been closed by either side, or after a transport error has occurred. Although the session may technically still be open, depending on the underlying implementation, sending messages at this point is discouraged and most likely will not succeed.
| |
| afterConnectionEstablished | back to summary |
|---|---|
| public void afterConnectionEstablished(WebSocketSession session) Overrides org. Implements org. Doc from org. Invoked after WebSocket negotiation has succeeded and the WebSocket connection is opened and ready for use.
| |
| handleMessage | back to summary |
|---|---|
| public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) Overrides org. Implements org. Doc from org. Invoked when a new WebSocket message arrives.
| |
| handleTransportError | back to summary |
|---|---|
| public void handleTransportError(WebSocketSession session, Throwable exception) Overrides org. Implements org. Doc from org. Handle an error from the underlying WebSocket message transport.
| |
| tryCloseWithError | back to summary |
|---|---|
| public static void tryCloseWithError(WebSocketSession session, Throwable exception, Log logger) | |