Class JettyRequestUpgradeStrategy
java.lang.Object
org.springframework.web.reactive.socket.server.upgrade.JettyRequestUpgradeStrategy
- All Implemented Interfaces:
RequestUpgradeStrategy
A webSocket
RequestUpgradeStrategy for Jetty 12 EE11.- Since:
- 5.3.4
- Author:
- Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddwebSocketConfigurer(Consumer<org.eclipse.jetty.websocket.api.Configurable> webSocketConfigurer) Add a callback to configure webSocket server parameters onJettywebSocketServerContainer.reactor.core.publisher.Mono<Void> upgrade(ServerwebExchange exchange, webSocketHandler handler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory) Upgrade to a webSocket session and handle it with the given handler.
-
Constructor Details
-
JettyRequestUpgradeStrategy
public JettyRequestUpgradeStrategy()
-
-
Method Details
-
addwebSocketConfigurer
public void addwebSocketConfigurer(Consumer<org.eclipse.jetty.websocket.api.Configurable> webSocketConfigurer) Add a callback to configure webSocket server parameters onJettywebSocketServerContainer.- Since:
- 6.1
-
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.
-