public interface RequestUpgradeStrategy
Typically there is one such strategy for every ServerHttpRequest
and ServerHttpResponse type except in the case of Servlet containers
for which the standard Java WebSocket API JSR-356 does not define a way to
upgrade a request so a custom strategy is needed for every Servlet container.
| Modifier and Type | Method and Description |
|---|---|
default reactor.core.publisher.Mono<Void> |
upgrade(ServerWebExchange exchange,
WebSocketHandler webSocketHandler,
String subProtocol)
Deprecated.
as of 5.1 in favor of
upgrade(ServerWebExchange, WebSocketHandler, String, Supplier) |
default reactor.core.publisher.Mono<Void> |
upgrade(ServerWebExchange exchange,
WebSocketHandler webSocketHandler,
String subProtocol,
Supplier<HandshakeInfo> handshakeInfoFactory)
Upgrade to a WebSocket session and handle it with the given handler.
|
@Deprecated default reactor.core.publisher.Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler webSocketHandler, @Nullable String subProtocol)
upgrade(ServerWebExchange, WebSocketHandler, String, Supplier)exchange - the current exchangewebSocketHandler - handler for the WebSocket sessionsubProtocol - the selected sub-protocol got the handlerMono<Void> to indicate the outcome of the
WebSocket session handling.default reactor.core.publisher.Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler webSocketHandler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory)
exchange - the current exchangewebSocketHandler - handler for the WebSocket sessionsubProtocol - the selected sub-protocol got the handlerhandshakeInfoFactory - factory to create HandshakeInfo for the WebSocket sessionMono<Void> to indicate the outcome of the
WebSocket session handling.