| Package | Description |
|---|---|
| org.apache.hc.client5.http.websocket.client |
High-level asynchronous WebSocket client.
|
| Modifier and Type | Method and Description |
|---|---|
static WebSocketClientBuilder |
WebSocketClientBuilder.create()
Creates a new
WebSocketClientBuilder instance. |
static WebSocketClientBuilder |
WebSocketClients.custom()
Creates a new
WebSocketClientBuilder instance for
custom client configuration. |
WebSocketClientBuilder |
WebSocketClientBuilder.defaultConfig(WebSocketClientConfig defaultConfig)
Sets the default configuration applied to WebSocket connections
created by the resulting client.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setCharCodingConfig(CharCodingConfig charCodingConfig)
Sets the character coding configuration for HTTP message processing.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)
Sets the connection reuse strategy for persistent HTTP connections.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)
Sets a listener for connection pool events.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setDefaultMaxPerRoute(int defaultMaxPerRoute)
Sets the default maximum number of connections per route.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setExceptionCallback(Callback<Exception> exceptionCallback)
Sets a callback to be notified of fatal I/O exceptions.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setH2Config(H2Config h2Config)
Sets the HTTP/2 configuration for the underlying H2 requester.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setH2HttpProcessor(HttpProcessor h2HttpProcessor)
Sets a custom
HttpProcessor for the HTTP/2 requester. |
WebSocketClientBuilder |
WebSocketClientBuilder.setHttp1Config(Http1Config http1Config)
Sets the HTTP/1.1 configuration for the underlying requester.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setHttpProcessor(HttpProcessor httpProcessor)
Sets a custom
HttpProcessor for HTTP/1.1 requests. |
WebSocketClientBuilder |
WebSocketClientBuilder.setIOReactorConfig(IOReactorConfig ioReactorConfig)
Sets the I/O reactor configuration.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)
Sets a decorator for low-level I/O sessions created by the reactor.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setIOSessionListener(IOSessionListener sessionListener)
Sets a listener for I/O session lifecycle events.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setMaxPendingCommandsPerConnection(int maxPendingCommandsPerConnection)
Sets the maximum number of pending commands per HTTP/1.1 connection.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setMaxTotal(int maxTotal)
Sets the maximum total number of connections in the pool.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)
Sets the concurrency policy for the connection pool.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setPoolReusePolicy(PoolReusePolicy poolReusePolicy)
Sets the reuse policy for connections in the pool.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setReactorMetricsListener(IOReactorMetricsListener reactorMetricsListener)
Sets a metrics listener for the I/O reactor.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setStreamListener(Http1StreamListener streamListener)
Sets a listener for HTTP/1.1 stream events.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setThreadFactory(ThreadFactory threadFactory)
Sets the thread factory used to create the main I/O reactor thread.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setTimeToLive(Timeout timeToLive)
Sets the time-to-live for persistent connections in the pool.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setTlsHandshakeTimeout(Timeout handshakeTimeout)
Sets the timeout for the TLS handshake.
|
WebSocketClientBuilder |
WebSocketClientBuilder.setTlsStrategy(TlsStrategy tlsStrategy)
Sets the TLS strategy used to establish HTTPS or WSS connections.
|
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.