Top Description Methods
org.springframework.web.reactive.socket.server

public Interface WebSocketService

Known Direct Implementers
org.springframework.web.reactive.socket.server.support.HandshakeWebSocketService, org.springframework.web.reactive.config.WebFluxConfigurationSupport.NoUpgradeStrategyWebSocketService
Imports
reactor.core.publisher.Mono, org.springframework.web.reactive.socket.WebSocketHandler, org.springframework.web.server.ServerWebExchange

A service to delegate WebSocket-related HTTP requests to.

For a WebSocket endpoint this means handling the initial WebSocket HTTP handshake request. For a SockJS endpoint it could mean handling all HTTP requests defined in the SockJS protocol.

Author
Rossen Stoyanchev
Since
5.0
See Also
org.springframework.web.reactive.socket.server.support.HandshakeWebSocketService

Method Summary

Modifier and TypeMethod and Description
public Mono<Void>

Returns:

a Mono<Void> that completes when application handling of the WebSocket session completes.
handleRequest
(ServerWebExchange
the current exchange
exchange
,
WebSocketHandler
handler for WebSocket session
webSocketHandler
)

Handle the request with the given WebSocketHandler.

Method Detail

handleRequestback to summary
public Mono<Void> handleRequest(ServerWebExchange exchange, WebSocketHandler webSocketHandler)

Handle the request with the given WebSocketHandler.

Parameters
exchange:ServerWebExchange

the current exchange

webSocketHandler:WebSocketHandler

handler for WebSocket session

Returns:Mono<Void>

a Mono<Void> that completes when application handling of the WebSocket session completes.