public static interface ClientOverrideConfiguration.Builder extends CopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
ClientOverrideConfiguration
.
All implementations of this interface are mutable and not thread safe.
Modifier and Type | Method and Description |
---|---|
ClientOverrideConfiguration.Builder |
addAdditionalHttpHeader(String header,
String... values)
Add a header that should be sent with every HTTP request to AWS.
|
ClientOverrideConfiguration.Builder |
additionalHttpHeaders(Map<String,List<String>> additionalHttpHeaders)
Define a set of headers that should be added to every HTTP request sent to AWS.
|
ClientOverrideConfiguration.Builder |
addLastExecutionInterceptor(ExecutionInterceptor executionInterceptor)
Add an execution interceptor that will have access to read and modify the request and response objects as they are
processed by the SDK.
|
<T> ClientOverrideConfiguration.Builder |
advancedOption(AdvancedClientOption<T> option,
T value)
Configure an advanced override option.
|
ClientOverrideConfiguration.Builder |
advancedOptions(Map<AdvancedClientOption<?>,?> advancedOptions)
Configure the map of advanced override options.
|
ClientOverrideConfiguration.Builder |
gzipEnabled(Boolean gzipEnabled)
Configure whether GZIP should be used when communicating with AWS.
|
ClientOverrideConfiguration.Builder |
httpRequestTimeout(Duration httpRequestTimeout)
Configure the amount of time to wait for the request to complete before giving up and timing out.
|
ClientOverrideConfiguration.Builder |
lastExecutionInterceptors(List<ExecutionInterceptor> executionInterceptors)
Configure a list of execution interceptors that will have access to read and modify the request and response objcets as
they are processed by the SDK.
|
default ClientOverrideConfiguration.Builder |
retryPolicy(Consumer<RetryPolicy.Builder> retryPolicy)
Configure the retry policy the should be used when handling failure cases.
|
ClientOverrideConfiguration.Builder |
retryPolicy(RetryPolicy retryPolicy)
Configure the retry policy that should be used when handling failure cases.
|
ClientOverrideConfiguration.Builder |
totalExecutionTimeout(Duration totalExecutionTimeout)
Configure the amount of time to allow the client to complete the execution of an API call.
|
copy
apply, build
ClientOverrideConfiguration.Builder httpRequestTimeout(Duration httpRequestTimeout)
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The request timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the request timeout feature should not be used when absolute precision is needed.
ClientOverrideConfiguration.Builder totalExecutionTimeout(Duration totalExecutionTimeout)
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The client execution timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the client execution timeout feature should not be used when absolute precision is needed.
This may be used together with ClientOverrideConfiguration.httpRequestTimeout()
to enforce both a timeout on each individual HTTP
request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'client execution' time).
A non-positive value disables this feature.
ClientOverrideConfiguration.Builder additionalHttpHeaders(Map<String,List<String>> additionalHttpHeaders)
ClientOverrideConfiguration.Builder addAdditionalHttpHeader(String header, String... values)
For example, the following code will result in two different "X-Header" values sent to AWS.
httpConfiguration.addAdditionalHttpHeader("X-Header", "Value1"); httpConfiguration.addAdditionalHttpHeader("X-Header", "Value2");
ClientOverrideConfiguration.Builder gzipEnabled(Boolean gzipEnabled)
ClientOverrideConfiguration.Builder retryPolicy(RetryPolicy retryPolicy)
default ClientOverrideConfiguration.Builder retryPolicy(Consumer<RetryPolicy.Builder> retryPolicy)
ClientOverrideConfiguration.Builder lastExecutionInterceptors(List<ExecutionInterceptor> executionInterceptors)
addLastExecutionInterceptor(ExecutionInterceptor)
.
The provided interceptors are executed in the order they are configured and are always later in the order than the ones
automatically added by the SDK. See ExecutionInterceptor
for a more detailed explanation of interceptor order.ClientOverrideConfiguration.Builder addLastExecutionInterceptor(ExecutionInterceptor executionInterceptor)
ExecutionInterceptor
for a more detailed explanation of
interceptor order.<T> ClientOverrideConfiguration.Builder advancedOption(AdvancedClientOption<T> option, T value)
T
- The type of the option.option
- The option to configure.value
- The value of the option.ClientOverrideConfiguration.Builder advancedOptions(Map<AdvancedClientOption<?>,?> advancedOptions)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.