org.springframework.web.socket.WebSocketHandler
instance and delegates to it.
Also provides a getDelegate() method to return the decorated
handler as well as a getLastHandler() method to go through all nested
delegates and return the "last" handler.
| Modifier and Type | Field and Description |
|---|---|
| private final WebSocketHandler |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)
Implements org. Invoked after the WebSocket connection has been closed by either side, or after a transport error has occurred. |
| public void | afterConnectionEstablished(WebSocketSession session)
Implements org. Invoked after WebSocket negotiation has succeeded and the WebSocket connection is opened and ready for use. |
| public WebSocketHandler | |
| public WebSocketHandler | |
| public void | handleMessage(WebSocketSession session, WebSocketMessage<?> message)
Implements org. Invoked when a new WebSocket message arrives. |
| public void | handleTransportError(WebSocketSession session, Throwable exception)
Implements org. Handle an error from the underlying WebSocket message transport. |
| public boolean | supportsPartialMessages()
Implements org. Whether the WebSocketHandler handles partial messages. |
| public String | |
| public static WebSocketHandler |
| delegate | back to summary |
|---|---|
| private final WebSocketHandler delegate | |
| WebSocketHandlerDecorator | back to summary |
|---|---|
| public WebSocketHandlerDecorator(WebSocketHandler delegate) | |
| afterConnectionClosed | back to summary |
|---|---|
| public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception 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) throws Exception Implements org. Doc from org. Invoked after WebSocket negotiation has succeeded and the WebSocket connection is opened and ready for use. | |
| getDelegate | back to summary |
|---|---|
| public WebSocketHandler getDelegate() | |
| getLastHandler | back to summary |
|---|---|
| public WebSocketHandler getLastHandler() | |
| handleMessage | back to summary |
|---|---|
| public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) throws Exception Implements org. Doc from org. Invoked when a new WebSocket message arrives. | |
| handleTransportError | back to summary |
|---|---|
| public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception Implements org. Doc from org. Handle an error from the underlying WebSocket message transport. | |
| supportsPartialMessages | back to summary |
|---|---|
| public boolean supportsPartialMessages() Implements org. Doc from org. Whether the WebSocketHandler handles partial messages. If this flag is set to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| unwrap | back to summary |
|---|---|
| public static WebSocketHandler unwrap(WebSocketHandler handler) | |