Methods
withConnectTimeout(connectTimeoutnon-null) → {ClientConfigBuilder}
- Description:
Sets the connect timeout. It should be greater than zero.
Parameters:
Name | Type | Description |
---|---|---|
connectTimeout |
Number | Specifies the timeout in milliseconds until a connection is established in the API calls. Default value is 10000 milliseconds |
Returns:
This Builder instance to add any additional parameters.
- Type
- ClientConfigBuilder
withReadTimeout(readTimeoutnon-null) → {ClientConfigBuilder}
- Description:
Sets the read timeout. It should be greater than zero.
Parameters:
Name | Type | Description |
---|---|---|
readTimeout |
Number | Specifies the read 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 10000 milliseconds |
Returns:
This Builder instance to add any additional parameters.
- Type
- ClientConfigBuilder
withProcessingTimeout(processingTimeoutnon-null) → {ClientConfigBuilder}
- Description:
Sets the processing timeout. It should be greater than or equal to 600000 (10 minutes).
Parameters:
Name | Type | Description |
---|---|---|
processingTimeout |
Number | Specifies the processing timeout in milliseconds to process the documents. Default value is 600000 milliseconds (10 minutes) |
Returns:
This Builder instance to add any additional parameters.
- Type
- ClientConfigBuilder
setRegion(regionnon-null) → {ClientConfigBuilder}
- Description:
Sets the region code.
Parameters:
Name | Type | Description |
---|---|---|
region |
Region | Service region. Default value is US. See Region for valid values. |
Returns:
This builder instance to add any additional parameters
- Type
- ClientConfigBuilder
fromFile(clientConfigFilePathnon-null) → {ClientConfigBuilder}
- Description:
Sets the connect timeout, read timeout and region code using the JSON client config file path. All the keys in the JSON structure are optional.
JSON structure:
{ "connectTimeout": "4000", "readTimeout": "20000", "region": "EU", "processingTimeout": "600000" }
Parameters:
Name | Type | Description |
---|---|---|
clientConfigFilePath |
String | JSON client config file path |
Returns:
This Builder instance to add any additional parameters.
- Type
- ClientConfigBuilder
build() → {ClientConfig}
- Description:
Returns a new ClientConfig instance built from the current state of this builder.
Returns:
A ClientConfig instance.
- Type
- ClientConfig