Interface WebSocketClient
- All Known Implementing Classes:
JettyWebSocketClient,ReactorNettyWebSocketClient,StandardWebSocketClient,TomcatWebSocketClient,UndertowWebSocketClient
public interface WebSocketClient
Contract for reactive-style handling of a WebSocket session.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>execute(URI url, HttpHeaders headers, WebSocketHandler handler)A variant ofexecute(URI, WebSocketHandler)with custom headers.reactor.core.publisher.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.
Method Detail
execute
reactor.core.publisher.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- the handshake urlhandler- the handler of the WebSocket session- Returns:
- completion
Mono<Void>to indicate the outcome of the WebSocket session handling.
execute
reactor.core.publisher.Mono<Void> execute(URI url, HttpHeaders headers, WebSocketHandler handler)
A variant ofexecute(URI, WebSocketHandler)with custom headers.- Parameters:
url- the handshake urlheaders- custom headers for the handshake requesthandler- the handler of the WebSocket session- Returns:
- completion
Mono<Void>to indicate the outcome of the WebSocket session handling.