WebSocketClient implementation for use with the Jakarta WebSocket API.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Log | |
| private final WebSocketContainer |
| Access | Constructor and Description |
|---|---|
| public | StandardWebSocketClient()
Default constructor that calls
|
| public | StandardWebSocketClient(WebSocketContainer
a web socket container webSocketContainer)Constructor accepting an existing |
| Modifier and Type | Method and Description |
|---|---|
| protected DataBufferFactory | |
| private StandardWebSocketHandlerAdapter | createEndpoint(URI url, WebSocketHandler handler, Sinks.
|
| protected ClientEndpointConfig | createEndpointConfig(ClientEndpointConfig.
the configurator to apply configurator,the preferred sub-protocols subProtocols)Create the |
| private HandshakeInfo | |
| protected StandardWebSocketSession | createWebSocketSession(Session session, HandshakeInfo info, Sinks.
Create the |
| public Mono | execute(URI
the handshake url url, WebSocketHandler the handler of the WebSocket session handler)Implements org. Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler. |
| public Mono | execute(URI
the handshake url url, HttpHeaders custom headers for the handshake request headers, WebSocketHandler the handler of the WebSocket session handler)Implements org. A variant of |
| private Mono | |
| public WebSocketContainer |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| webSocketContainer | back to summary |
|---|---|
| private final WebSocketContainer webSocketContainer | |
| StandardWebSocketClient | back to summary |
|---|---|
| public StandardWebSocketClient() Default constructor that calls
| |
| StandardWebSocketClient | back to summary |
|---|---|
| public StandardWebSocketClient(WebSocketContainer webSocketContainer) Constructor accepting an existing
| |
| bufferFactory | back to summary |
|---|---|
| protected DataBufferFactory bufferFactory() Return the
| |
| createEndpoint | back to summary |
|---|---|
| private StandardWebSocketHandlerAdapter createEndpoint(URI url, WebSocketHandler handler, Sinks. | |
| createEndpointConfig | back to summary |
|---|---|
| protected ClientEndpointConfig createEndpointConfig(ClientEndpointConfig. Create the
| |
| createHandshakeInfo | back to summary |
|---|---|
| private HandshakeInfo createHandshakeInfo(URI url, StandardWebSocketClient. | |
| createWebSocketSession | back to summary |
|---|---|
| protected StandardWebSocketSession createWebSocketSession(Session session, HandshakeInfo info, Sinks. Create the
| |
| execute | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.
| |
| execute | back to summary |
|---|---|
| public Mono Implements org. Doc from org. A variant of
| |
| executeInternal | back to summary |
|---|---|
| private Mono | |
| getWebSocketContainer | back to summary |
|---|---|
| public WebSocketContainer getWebSocketContainer() Return the configured | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders | |
| private final HttpHeaders |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterResponse(HandshakeResponse
The response response)Overrides jakarta. Provides the client with a mechanism to inspect the handshake response that is returned from the server. |
| public void | beforeRequest(Map<String, List<String>>
The HTTP headers requestHeaders)Overrides jakarta. Provides the client with a mechanism to inspect and/or modify the headers that are sent to the server to start the WebSocket handshake. |
| public HttpHeaders |
| requestHeaders | back to summary |
|---|---|
| private final HttpHeaders requestHeaders | |
| responseHeaders | back to summary |
|---|---|
| private final HttpHeaders responseHeaders | |
| DefaultConfigurator | back to summary |
|---|---|
| public DefaultConfigurator(HttpHeaders requestHeaders) | |
| afterResponse | back to summary |
|---|---|
| public void afterResponse(HandshakeResponse response) Overrides jakarta. Doc from jakarta. Provides the client with a mechanism to inspect the handshake response that is returned from the server.
| |
| beforeRequest | back to summary |
|---|---|
| public void beforeRequest(Map<String, List<String>> requestHeaders) Overrides jakarta. Doc from jakarta. Provides the client with a mechanism to inspect and/or modify the headers that are sent to the server to start the WebSocket handshake. | |
| getResponseHeaders | back to summary |
|---|---|
| public HttpHeaders getResponseHeaders() | |