| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionConfig.Builder
Builder for
ConnectionConfig. |
| Modifier and Type | Field and Description |
|---|---|
static ConnectionConfig |
DEFAULT
The default connection configuration.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ConnectionConfig()
Intended for CDI compatibility
|
| Modifier and Type | Method and Description |
|---|---|
protected ConnectionConfig |
clone() |
static ConnectionConfig.Builder |
copy(ConnectionConfig config)
Creates a new builder for
ConnectionConfig based on an existing instance. |
static ConnectionConfig.Builder |
custom()
Creates a new builder for
ConnectionConfig. |
Timeout |
getConnectTimeout()
Gets the timeout until the target endpoint acknowledges accepting the connection request.
|
Timeout |
getIdleTimeout()
Gets the maximum period of idleness for a connection.
|
Timeout |
getSocketTimeout()
Gets the default socket timeout value for I/O operations on connections created by this configuration.
|
TimeValue |
getTimeToLive()
Gets the total span of time connections can be kept alive or execute requests.
|
TimeValue |
getValidateAfterInactivity()
Gets the period of inactivity after which persistent connections must be re-validated.
|
String |
toString() |
public static final ConnectionConfig DEFAULT
null (undefined)null (undefined)null (undefined)null (undefined)public Timeout getSocketTimeout()
ConnectionConfig.Builder.setSocketTimeout(Timeout)public Timeout getConnectTimeout()
Note that isn't the same time as the new connection being fully established. An HTTPS connection cannot be considered fully established until the TLS handshake has been successfully completed.
A timeout value of zero is interpreted as an infinite timeout.
ConnectionConfig.Builder.setConnectTimeout(Timeout)public Timeout getIdleTimeout()
Implementations can use this value to discard connections that have been idle for too long.
ConnectionConfig.Builder.setIdleTimeout(Timeout)public TimeValue getValidateAfterInactivity()
ConnectionConfig.Builder.setValidateAfterInactivity(TimeValue)public TimeValue getTimeToLive()
(TimeValue)protected ConnectionConfig clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic static ConnectionConfig.Builder custom()
ConnectionConfig.ConnectionConfig.public static ConnectionConfig.Builder copy(ConnectionConfig config)
ConnectionConfig based on an existing instance.config - the instance to copy.ConnectionConfig.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.