CopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
, SdkBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
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 | 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 |
addRequestListener(RequestHandler requestListener) |
Add a request listener that will be hooked into the execution of each request after the listeners that have previously
been configured have all been executed.
|
<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 |
requestListeners(List<RequestHandler> requestListeners) |
Configure an immutable collection of request listeners that should be hooked into the execution of each request, in
the order that they should be applied.
|
ClientOverrideConfiguration.Builder |
requestMetricCollector(RequestMetricCollector metricCollector) |
Set the metric collector that should be notified of each request event.
|
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 requestMetricCollector(RequestMetricCollector metricCollector)
ClientOverrideConfiguration.Builder retryPolicy(RetryPolicy retryPolicy)
ClientOverrideConfiguration.Builder requestListeners(List<RequestHandler> requestListeners)
ClientOverrideConfiguration.Builder addRequestListener(RequestHandler requestListener)
<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.