spring-framework / org.springframework.web.reactive.socket.server.support / WebSocketHandlerAdapter

WebSocketHandlerAdapter

open class WebSocketHandlerAdapter : HandlerAdapter

HandlerAdapter that allows using a WebSocketHandler with the generic DispatcherHandler mapping URLs directly to such handlers. Requests are handled by delegating to the configured WebSocketService which by default is HandshakeWebSocketService.

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

WebSocketHandlerAdapter()

Default constructor that creates and uses a HandshakeWebSocketService.

WebSocketHandlerAdapter(webSocketService: WebSocketService)

Alternative constructor with the WebSocketService to use.

Functions

getWebSocketService

open fun getWebSocketService(): WebSocketService

handle

open fun handle(exchange: ServerWebExchange, handler: Any): Mono<HandlerResult>

supports

open fun supports(handler: Any): Boolean