WebSocketHandler decorator that enriches the context of the target handler.
| Modifier and Type | Field and Description |
|---|---|
| private final ContextView | |
| private final WebSocketHandler |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static WebSocketHandler | decorate(WebSocketHandler handler, ContextView contextView)
Return the given handler, decorated to insert the given context, or the same handler instance when the context is empty. |
| public List | getSubProtocols()
Overrides default org. Return the list of sub-protocols supported by this handler. |
| public Mono | handle(WebSocketSession
the session to handle session)Implements org. Invoked when a new WebSocket connection is established, and allows handling of the session. |
| contextView | back to summary |
|---|---|
| private final ContextView contextView | |
| delegate | back to summary |
|---|---|
| private final WebSocketHandler delegate | |
| ContextWebSocketHandler | back to summary |
|---|---|
| private ContextWebSocketHandler(WebSocketHandler delegate, ContextView contextView) | |
| decorate | back to summary |
|---|---|
| public static WebSocketHandler decorate(WebSocketHandler handler, ContextView contextView) Return the given handler, decorated to insert the given context, or the same handler instance when the context is empty. | |
| getSubProtocols | back to summary |
|---|---|
| public List Overrides default org. Doc from org. Return the list of sub-protocols supported by this handler. By default an empty list is returned.
| |
| handle | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Invoked when a new WebSocket connection is established, and allows handling of the session. See the class-level doc and the reference manual for more details and examples of how to handle the session.
| |