public class HttpClientConnectionManagerOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_BUFFER_SIZE |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_MAX_WINDOW_SIZE |
Constructor and Description |
---|
HttpClientConnectionManagerOptions() |
Modifier and Type | Method and Description |
---|---|
int |
getBufferSize() |
ClientBootstrap |
getClientBootstrap()
Gets the client bootstrap instance to use to create the pool's connections
|
long |
getMaxConnectionIdleInMilliseconds() |
int |
getMaxConnections() |
HttpMonitoringOptions |
getMonitoringOptions() |
int |
getPort() |
HttpProxyOptions |
getProxyOptions() |
SocketOptions |
getSocketOptions() |
TlsContext |
getTlsContext() |
URI |
getUri() |
int |
getWindowSize() |
boolean |
isManualWindowManagement()
If set to true, then the TCP read back pressure mechanism will be enabled.
|
HttpClientConnectionManagerOptions |
withBufferSize(int bufferSize)
Sets the IO buffer size to use for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withClientBootstrap(ClientBootstrap clientBootstrap)
Sets the client bootstrap instance to use to create the pool's connections
|
HttpClientConnectionManagerOptions |
withManualWindowManagement(boolean manualWindowManagement)
If set to true, then the TCP read back pressure mechanism will be enabled.
|
HttpClientConnectionManagerOptions |
withMaxConnectionIdleInMilliseconds(long maxConnectionIdleInMilliseconds)
Sets maximum amount of time, in milliseconds, that the connection can be idle in the manager before
getting culled by the manager
|
HttpClientConnectionManagerOptions |
withMaxConnections(int maxConnections)
Sets the maximum number of connections allowed in the connection pool
|
HttpClientConnectionManagerOptions |
withMonitoringOptions(HttpMonitoringOptions monitoringOptions)
Sets the monitoring options for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withPort(int port)
Sets the port to connect to for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withProxyOptions(HttpProxyOptions proxyOptions)
Sets the proxy options for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withSocketOptions(SocketOptions socketOptions)
Sets the socket options to use for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withTlsContext(TlsContext tlsContext)
Sets the tls context to use for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withUri(URI uri)
Sets the URI to use for connections in the connection pool
|
HttpClientConnectionManagerOptions |
withWindowSize(int windowSize)
Sets the IO channel window size to use for connections in the connection pool
|
public static final int DEFAULT_MAX_BUFFER_SIZE
public static final int DEFAULT_MAX_WINDOW_SIZE
public static final int DEFAULT_MAX_CONNECTIONS
public HttpClientConnectionManagerOptions withClientBootstrap(ClientBootstrap clientBootstrap)
clientBootstrap
- ClientBootstrap to usepublic ClientBootstrap getClientBootstrap()
public HttpClientConnectionManagerOptions withSocketOptions(SocketOptions socketOptions)
socketOptions
- The socket options to use for all connections in the managerpublic SocketOptions getSocketOptions()
public HttpClientConnectionManagerOptions withTlsContext(TlsContext tlsContext)
tlsContext
- The TlsContext to usepublic TlsContext getTlsContext()
public HttpClientConnectionManagerOptions withWindowSize(int windowSize)
windowSize
- The initial window size to use for each connectionpublic int getWindowSize()
public HttpClientConnectionManagerOptions withBufferSize(int bufferSize)
bufferSize
- Size of I/O buffer per connectionpublic int getBufferSize()
public HttpClientConnectionManagerOptions withUri(URI uri)
uri
- The endpoint URI to connect topublic URI getUri()
public HttpClientConnectionManagerOptions withPort(int port)
port
- The port to connect topublic int getPort()
public HttpClientConnectionManagerOptions withMaxConnections(int maxConnections)
maxConnections
- maximum number of connections to poolpublic int getMaxConnections()
public HttpClientConnectionManagerOptions withProxyOptions(HttpProxyOptions proxyOptions)
proxyOptions
- HttpProxyOptions for this connection manager, or null to disable proxyingpublic HttpProxyOptions getProxyOptions()
public boolean isManualWindowManagement()
public HttpClientConnectionManagerOptions withManualWindowManagement(boolean manualWindowManagement)
manualWindowManagement
- true to enable manual window management, false to use automatic window managementpublic HttpClientConnectionManagerOptions withMaxConnectionIdleInMilliseconds(long maxConnectionIdleInMilliseconds)
maxConnectionIdleInMilliseconds
- How long to allow connections to be idle before reaping thempublic long getMaxConnectionIdleInMilliseconds()
public HttpClientConnectionManagerOptions withMonitoringOptions(HttpMonitoringOptions monitoringOptions)
monitoringOptions
- Monitoring options for this connection manager, or null to disable monitoringpublic HttpMonitoringOptions getMonitoringOptions()
Copyright © 2021. All rights reserved.