Interface WebSocketClient
- All Known Implementing Classes:
AbstractWebSocketClient,SockJsClient,StandardWebSocketClient
public interface WebSocketClient
Contract for initiating a WebSocket request. As an alternative considering using the
declarative style
WebSocketConnectionManager that starts a WebSocket connection
to a pre-configured URI when the application starts.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexecute(WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.execute(WebSocketHandler webSocketHandler, String uriTemplate, @Nullable Object... uriVariables) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.
-
Method Details
-
execute
CompletableFuture<WebSocketSession> execute(WebSocketHandler webSocketHandler, String uriTemplate, @Nullable Object... uriVariables) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.- Parameters:
webSocketHandler- the session handleruriTemplate- the url templateuriVariables- the variables to expand the template- Returns:
- a future that completes when the session is available
- Since:
- 6.0
-
execute
CompletableFuture<WebSocketSession> execute(WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.- Parameters:
webSocketHandler- the session handleruri- the url- Returns:
- a future that completes when the session is available
- Since:
- 6.0
-