public class ClientOptions extends Object
Constructor and Description |
---|
ClientOptions()
Create new
ClientOptions with default values. |
ClientOptions(Duration connectionTimeout,
Duration readTimeout,
String[] caCertFiles)
Create a
ClientOptions with the provided values. |
Modifier and Type | Method and Description |
---|---|
String[] |
getCaCertFiles() |
Duration |
getConnectionTimeout()
Get the connection timeout in
TimeUnit.MILLISECONDS . |
Integer |
getConnectionTimeoutMillis()
Get the connection timeout in
TimeUnit.MILLISECONDS . |
Duration |
getReadTimeout()
Get the read timeout in
TimeUnit.MILLISECONDS . |
Integer |
getReadTimeoutMillis()
Get the read timeout in
TimeUnit.MILLISECONDS . |
void |
setCaCertFiles(String[] caCertFiles) |
void |
setConnectionTimeout(Duration connectionTimeout) |
void |
setReadTimeout(Duration readTimeout) |
public ClientOptions()
ClientOptions
with default values.public ClientOptions(Duration connectionTimeout, Duration readTimeout, String[] caCertFiles)
ClientOptions
with the provided values.connectionTimeout
- connection timeout in TimeUnit.MILLISECONDS
, must
be greater 0readTimeout
- read timeout in TimeUnit.MILLISECONDS
, must be greater
0caCertFiles
- one or more CA certificate files to use when connectingpublic Duration getConnectionTimeout()
TimeUnit.MILLISECONDS
.public Integer getConnectionTimeoutMillis()
TimeUnit.MILLISECONDS
.public void setConnectionTimeout(Duration connectionTimeout)
public Duration getReadTimeout()
TimeUnit.MILLISECONDS
.public Integer getReadTimeoutMillis()
TimeUnit.MILLISECONDS
.public void setReadTimeout(Duration readTimeout)
public String[] getCaCertFiles()
public void setCaCertFiles(String[] caCertFiles)