Class JettyCoreRequestUpgradeStrategy

java.lang.Object
org.springframework.web.reactive.socket.server.upgrade.JettyCoreRequestUpgradeStrategy
All Implemented Interfaces:
RequestUpgradeStrategy

public class JettyCoreRequestUpgradeStrategy extends Object implements RequestUpgradeStrategy
A webSocket RequestUpgradeStrategy for Jetty 12 Core.
Since:
6.2
Author:
Rossen Stoyanchev, Greg Wilkins
  • Constructor Details

    • JettyCoreRequestUpgradeStrategy

      public JettyCoreRequestUpgradeStrategy()
  • Method Details

    • addwebSocketConfigurer

      public void addwebSocketConfigurer(Consumer<org.eclipse.jetty.websocket.api.Configurable> webSocketConfigurer)
      Add a callback to configure webSocket server parameters on JettywebSocketServerContainer.
    • upgrade

      public reactor.core.publisher.Mono<Void> upgrade(ServerwebExchange exchange, webSocketHandler handler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory)
      Description copied from interface: RequestUpgradeStrategy
      Upgrade to a webSocket session and handle it with the given handler.
      Specified by:
      upgrade in interface RequestUpgradeStrategy
      Parameters:
      exchange - the current exchange
      handler - handler for the webSocket session
      subProtocol - the selected sub-protocol got the handler
      handshakeInfoFactory - factory to create HandshakeInfo for the webSocket session
      Returns:
      completion Mono<Void> to indicate the outcome of the webSocket session handling.