public final class ContextWebSocketHandler extends Object implements WebSocketHandler
WebSocketHandler
decorator that enriches the context of the target handler.Modifier and Type | Method and Description |
---|---|
static WebSocketHandler |
decorate(WebSocketHandler handler,
reactor.util.context.ContextView contextView)
Return the given handler, decorated to insert the given context, or the
same handler instance when the context is empty.
|
List<String> |
getSubProtocols()
Return the list of sub-protocols supported by this handler.
|
reactor.core.publisher.Mono<Void> |
handle(WebSocketSession session)
Invoked when a new WebSocket connection is established, and allows
handling of the session.
|
public List<String> getSubProtocols()
WebSocketHandler
By default an empty list is returned.
getSubProtocols
in interface WebSocketHandler
public reactor.core.publisher.Mono<Void> handle(WebSocketSession session)
WebSocketHandler
See the class-level doc and the reference manual for more details and examples of how to handle the session.
handle
in interface WebSocketHandler
session
- the session to handlepublic static WebSocketHandler decorate(WebSocketHandler handler, reactor.util.context.ContextView contextView)