Class TomcatRequestUpgradeStrategy
java.lang.Object
org.springframework.web.reactive.socket.server.upgrade.TomcatRequestUpgradeStrategy
- All Implemented Interfaces:
RequestUpgradeStrategy
A
RequestUpgradeStrategy for use with Tomcat.- Since:
- 5.0
- Author:
- Violeta Georgieva, Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAsyncSendTimeout(Long timeoutInMillis) Exposes the underlying config option onWebSocketContainer.setAsyncSendTimeout(long).voidsetMaxBinaryMessageBufferSize(Integer bufferSize) Exposes the underlying config option onWebSocketContainer.setDefaultMaxBinaryMessageBufferSize(int).voidsetMaxSessionIdleTimeout(Long timeoutInMillis) Exposes the underlying config option onWebSocketContainer.setDefaultMaxSessionIdleTimeout(long).voidsetMaxTextMessageBufferSize(Integer bufferSize) Exposes the underlying config option onWebSocketContainer.setDefaultMaxTextMessageBufferSize(int).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.
-
Constructor Details
-
TomcatRequestUpgradeStrategy
public TomcatRequestUpgradeStrategy()
-
-
Method Details
-
setAsyncSendTimeout
Exposes the underlying config option onWebSocketContainer.setAsyncSendTimeout(long). -
getAsyncSendTimeout
-
setMaxSessionIdleTimeout
Exposes the underlying config option onWebSocketContainer.setDefaultMaxSessionIdleTimeout(long). -
getMaxSessionIdleTimeout
-
setMaxTextMessageBufferSize
Exposes the underlying config option onWebSocketContainer.setDefaultMaxTextMessageBufferSize(int). -
getMaxTextMessageBufferSize
-
setMaxBinaryMessageBufferSize
Exposes the underlying config option onWebSocketContainer.setDefaultMaxBinaryMessageBufferSize(int). -
getMaxBinaryMessageBufferSize
-
upgrade
public reactor.core.publisher.Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler handler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory) Description copied from interface:RequestUpgradeStrategyUpgrade to a WebSocket session and handle it with the given handler.- Specified by:
upgradein interfaceRequestUpgradeStrategy- Parameters:
exchange- the current exchangehandler- handler for the WebSocket sessionsubProtocol- the selected sub-protocol got the handlerhandshakeInfoFactory- factory to create HandshakeInfo for the WebSocket session- Returns:
- completion
Mono<Void>to indicate the outcome of the WebSocket session handling.
-