public class WebSocketHandlerDecorator extends Object implements WebSocketHandler
| Constructor and Description |
|---|
WebSocketHandlerDecorator(WebSocketHandler delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus)
Invoked after the WebSocket connection has been closed by either side, or after a
transport error has occurred.
|
void |
afterConnectionEstablished(WebSocketSession session)
Invoked after WebSocket negotiation has succeeded and the WebSocket connection is
opened and ready for use.
|
WebSocketHandler |
getDelegate() |
WebSocketHandler |
getLastHandler() |
void |
handleMessage(WebSocketSession session,
WebSocketMessage<?> message)
Invoked when a new WebSocket message arrives.
|
void |
handleTransportError(WebSocketSession session,
Throwable exception)
Handle an error from the underlying WebSocket message transport.
|
boolean |
supportsPartialMessages()
Whether the WebSocketHandler handles messages in parts.
|
String |
toString() |
public WebSocketHandlerDecorator(WebSocketHandler delegate)
public WebSocketHandler getDelegate()
public WebSocketHandler getLastHandler()
public void afterConnectionEstablished(WebSocketSession session) throws Exception
WebSocketHandlerafterConnectionEstablished in interface WebSocketHandlerException - this method can handle or propagate exceptions; see class-level
Javadoc for details.public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) throws Exception
WebSocketHandlerhandleMessage in interface WebSocketHandlerException - this method can handle or propagate exceptions; see class-level
Javadoc for details.public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception
WebSocketHandlerhandleTransportError in interface WebSocketHandlerException - this method can handle or propagate exceptions; see class-level
Javadoc for details.public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception
WebSocketHandlerafterConnectionClosed in interface WebSocketHandlerException - this method can handle or propagate exceptions; see class-level
Javadoc for details.public boolean supportsPartialMessages()
WebSocketHandlersupportsPartialMessages in interface WebSocketHandler