WebSocketClient implementation for use with Reactor Netty.
| Modifier and Type | Field and Description |
|---|---|
| private Boolean | |
| private final HttpClient | |
| private static final Log | |
| private Integer | |
| private final Supplier |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ReactorNettyWebSocketClient(HttpClient httpClient)
Constructor that accepts an existing |
| public | ReactorNettyWebSocketClient(HttpClient httpClient, Supplier<WebsocketClientSpec.
Constructor that accepts an existing |
| Modifier and Type | Method and Description |
|---|---|
| private WebsocketClientSpec | |
| 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 requestHeaders, WebSocketHandler the handler of the WebSocket session handler)Implements org. A variant of |
| public boolean | getHandlePing()
Deprecated
as of 5.3 in favor of
getWebsocketClientSpec()
Return the configured |
| public HttpClient | |
| public int | getMaxFramePayloadLength()
Deprecated
as of 5.3 in favor of
getWebsocketClientSpec()
Return the configured |
| public WebsocketClientSpec | getWebsocketClientSpec()
Build an instance of |
| public void | setHandlePing(boolean
whether to let Ping frames through for handling handlePing)
Deprecated
as of 5.3 in favor of providing a supplier of
reactor. with a
constructor argument
Configure whether to let ping frames through to be handled by the
|
| public void | setMaxFramePayloadLength(int
the max length for frames. maxFramePayloadLength)
Deprecated
as of 5.3 in favor of providing a supplier of
reactor. with a
constructor argument
Configure the maximum allowable frame payload length. |
| private void | |
| private HttpHeaders |
| handlePing | back to summary |
|---|---|
| private Boolean handlePing
| |
| httpClient | back to summary |
|---|---|
| private final HttpClient httpClient | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| maxFramePayloadLength | back to summary |
|---|---|
| private Integer maxFramePayloadLength
| |
| specBuilderSupplier | back to summary |
|---|---|
| private final Supplier<WebsocketClientSpec. | |
| ReactorNettyWebSocketClient | back to summary |
|---|---|
| public ReactorNettyWebSocketClient() Default constructor. | |
| ReactorNettyWebSocketClient | back to summary |
|---|---|
| public ReactorNettyWebSocketClient(HttpClient httpClient) Constructor that accepts an existing
| |
| ReactorNettyWebSocketClient | back to summary |
|---|---|
| public ReactorNettyWebSocketClient(HttpClient httpClient, Supplier<WebsocketClientSpec. Constructor that accepts an existing
| |
| buildSpec | back to summary |
|---|---|
| private WebsocketClientSpec buildSpec(String protocols) | |
| 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
| |
| getHandlePing | back to summary |
|---|---|
| public boolean getHandlePing()
Deprecated as of 5.3 in favor of Return the configured
| |
| getHttpClient | back to summary |
|---|---|
| public HttpClient getHttpClient() Return the configured | |
| getMaxFramePayloadLength | back to summary |
|---|---|
| public int getMaxFramePayloadLength()
Deprecated as of 5.3 in favor of Return the configured
| |
| getWebsocketClientSpec | back to summary |
|---|---|
| public WebsocketClientSpec getWebsocketClientSpec() Build an instance of
| |
| setHandlePing | back to summary |
|---|---|
| public void setHandlePing(boolean handlePing)
Deprecated as of 5.3 in favor of providing a supplier of
Configure whether to let ping frames through to be handled by the
By default this is set to
| |
| setMaxFramePayloadLength | back to summary |
|---|---|
| public void setMaxFramePayloadLength(int maxFramePayloadLength)
Deprecated as of 5.3 in favor of providing a supplier of
Configure the maximum allowable frame payload length. Setting this value to your application's requirement may reduce denial of service attacks using long data frames. Corresponds to the argument with the same name in the constructor of
By default set to 65536 (64K).
| |
| setNettyHeaders | back to summary |
|---|---|
| private void setNettyHeaders(HttpHeaders httpHeaders, HttpHeaders nettyHeaders) | |
| toHttpHeaders | back to summary |
|---|---|
| private HttpHeaders toHttpHeaders(WebsocketInbound inbound) | |