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, socket timeout and proxy config using the JSON client config file path.
|
ClientConfig.Builder |
withConnectTimeout(Integer connectTimeout)
Sets the connect timeout.
|
ClientConfig.Builder |
withProxyHost(String proxyHost)
Sets the Host name of proxy server (IP or DNS name)
|
ClientConfig.Builder |
withProxyPort(Integer proxyPort)
Sets the Port Number of Proxy server.
|
ClientConfig.Builder |
withProxyScheme(ClientConfig.ProxyScheme proxyScheme)
Sets the scheme of Proxy Server (http or https).
|
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 withProxyHost(String proxyHost)
proxyHost
- Host Name of Proxy Serverpublic ClientConfig.Builder withProxyPort(Integer proxyPort)
proxyPort
- Port Number of Proxy server. Proxy Scheme's default port is set if not provided.public ClientConfig.Builder withProxyScheme(ClientConfig.ProxyScheme proxyScheme)
proxyScheme
- Scheme of Proxy Server (http or https). Default value is http.public ClientConfig.Builder fromFile(String clientConfigFilePath)
JSON structure:
{ "connectTimeout": "4000", "socketTimeout": "20000", "proxyHost": "127.0.0.1", "proxyPort": "8080", "proxyScheme": "https" }
public ClientConfig build()
ClientConfig
instance built from the current state of this builder.ClientConfig
instanceCopyright © 2022 Adobe. All rights reserved.