org.springframework.web.reactive.socket.server

Interface RequestUpgradeStrategy

    • Method Detail

      • upgrade

        @Deprecated
        default reactor.core.publisher.Mono<java.lang.Void> upgrade(ServerWebExchange exchange,
                                                                                WebSocketHandler webSocketHandler,
                                                                                @Nullable
                                                                                java.lang.String subProtocol)
        Upgrade to a WebSocket session and handle it with the given handler.
        Parameters:
        exchange - the current exchange
        webSocketHandler - handler for the WebSocket session
        subProtocol - the selected sub-protocol got the handler
        Returns:
        completion Mono<Void> to indicate the outcome of the WebSocket session handling.
      • upgrade

        default reactor.core.publisher.Mono<java.lang.Void> upgrade(ServerWebExchange exchange,
                                                                    WebSocketHandler webSocketHandler,
                                                                    @Nullable
                                                                    java.lang.String subProtocol,
                                                                    java.util.function.Supplier<HandshakeInfo> handshakeInfoFactory)
        Upgrade to a WebSocket session and handle it with the given handler.
        Parameters:
        exchange - the current exchange
        webSocketHandler - 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.
        Since:
        5.1