public class ReactorNettyRequestUpgradeStrategy extends Object implements RequestUpgradeStrategy
RequestUpgradeStrategy for use with Reactor Netty.| Constructor and Description |
|---|
ReactorNettyRequestUpgradeStrategy() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxFramePayloadLength()
Return the configured max length for frames.
|
void |
setMaxFramePayloadLength(Integer maxFramePayloadLength)
Configure the maximum allowable frame payload length.
|
reactor.core.publisher.Mono<Void> |
upgrade(ServerWebExchange exchange,
WebSocketHandler handler,
String subProtocol,
Supplier<HandshakeInfo> handshakeInfoFactory)
Upgrade to a WebSocket session and handle it with the given handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupgradepublic void setMaxFramePayloadLength(Integer maxFramePayloadLength)
Corresponds to the argument with the same name in the constructor of
WebSocketServerHandshakerFactory in Netty.
By default set to 65536 (64K).
maxFramePayloadLength - the max length for frames.public int getMaxFramePayloadLength()
public reactor.core.publisher.Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler handler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory)
RequestUpgradeStrategyupgrade in interface RequestUpgradeStrategyexchange - the current exchangehandler - 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.