public final class WebSocketClients extends Object
CloseableWebSocketClient instances.
This is a convenience entry point for typical client creation
scenarios. For advanced configuration use
WebSocketClientBuilder directly.
Clients created by these helpers own their I/O resources and must be closed when no longer needed.
| Modifier and Type | Method and Description |
|---|---|
static CloseableWebSocketClient |
createDefault()
Creates a
CloseableWebSocketClient instance with
default configuration. |
static CloseableWebSocketClient |
createWith(WebSocketClientConfig defaultConfig)
Creates a
CloseableWebSocketClient instance using
the given default WebSocket configuration. |
static WebSocketClientBuilder |
custom()
Creates a new
WebSocketClientBuilder instance for
custom client configuration. |
public static WebSocketClientBuilder custom()
WebSocketClientBuilder instance for
custom client configuration.WebSocketClientBuilder.public static CloseableWebSocketClient createDefault()
CloseableWebSocketClient instance with
default configuration.CloseableWebSocketClient
using default settings.public static CloseableWebSocketClient createWith(WebSocketClientConfig defaultConfig)
CloseableWebSocketClient instance using
the given default WebSocket configuration.defaultConfig - default configuration applied to
WebSocket connections created by
the client; must not be null.CloseableWebSocketClient.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.