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

public Interface WebSocketClient

Known Direct Implementers
org.springframework.web.reactive.socket.client.ReactorNetty2WebSocketClient, org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient, org.springframework.web.reactive.socket.client.StandardWebSocketClient, org.springframework.web.reactive.socket.client.UndertowWebSocketClient
Imports
java.net.URI, reactor.core.publisher.Mono, org.springframework.http.HttpHeaders, org.springframework.web.reactive.socket.WebSocketHandler

Contract for reactive-style handling of a WebSocket session.
Author
Rossen Stoyanchev
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public Mono<Void>

Returns:

completion Mono<Void> to indicate the outcome of the WebSocket session handling.
execute
(URI
the handshake url
url
,
WebSocketHandler
the handler of the WebSocket session
handler
)

Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.

public Mono<Void>

Returns:

completion Mono<Void> to indicate the outcome of the WebSocket session handling.
execute
(URI
the handshake url
url
,
HttpHeaders
custom headers for the handshake request
headers
,
WebSocketHandler
the handler of the WebSocket session
handler
)

A variant of execute(URI, WebSocketHandler) with custom headers.

Method Detail

executeback to summary
public Mono<Void> execute(URI url, WebSocketHandler handler)

Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.

Parameters
url:URI

the handshake url

handler:WebSocketHandler

the handler of the WebSocket session

Returns:Mono<Void>

completion Mono<Void> to indicate the outcome of the WebSocket session handling.

executeback to summary
public Mono<Void> execute(URI url, HttpHeaders headers, WebSocketHandler handler)

A variant of execute(URI, WebSocketHandler) with custom headers.

Parameters
url:URI

the handshake url

headers:HttpHeaders

custom headers for the handshake request

handler:WebSocketHandler

the handler of the WebSocket session

Returns:Mono<Void>

completion Mono<Void> to indicate the outcome of the WebSocket session handling.