public static class ClientConfig.Builder extends Object
ClientConfig instance.| Constructor and Description |
|---|
Builder()
Constructs a
Builder instance. |
| Modifier and Type | Method and Description |
|---|---|
ClientConfig |
build()
Returns a new
ClientConfig instance built from the current state of this builder. |
ClientConfig.Builder |
fromFile(String clientConfigFilePath)
Sets the connect timeout and socket timeout using the JSON client config file path.
|
ClientConfig.Builder |
withConnectTimeout(Integer connectTimeout)
Sets the connect timeout.
|
ClientConfig.Builder |
withSocketTimeout(Integer socketTimeout)
Sets the socket timeout.
|
public ClientConfig.Builder withConnectTimeout(Integer connectTimeout)
connectTimeout - determines the timeout in milliseconds until a connection is established in the API calls. Default value is 10000 millisecondspublic ClientConfig.Builder withSocketTimeout(Integer socketTimeout)
socketTimeout - Defines the socket timeout in milliseconds, which is the timeout for waiting for data or,
put differently, a maximum period inactivity between two consecutive data packets).
Default value is 2000 millisecondspublic ClientConfig.Builder fromFile(String clientConfigFilePath)
JSON structure:
{
"connectTimeout": "4000",
"socketTimeout": "20000"
}clientConfigFilePath - the file path for client configpublic ClientConfig build()
ClientConfig instance built from the current state of this builder.ClientConfig instanceCopyright © 2021 Adobe. All rights reserved.