Class RequestOverrideConfiguration.BuilderImpl<B extends RequestOverrideConfiguration.Builder>
- java.lang.Object
-
- software.amazon.awssdk.core.RequestOverrideConfiguration.BuilderImpl<B>
-
- All Implemented Interfaces:
RequestOverrideConfiguration.Builder<B>
- Enclosing class:
- RequestOverrideConfiguration
protected abstract static class RequestOverrideConfiguration.BuilderImpl<B extends RequestOverrideConfiguration.Builder> extends Object implements RequestOverrideConfiguration.Builder<B>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BuilderImpl()
protected
BuilderImpl(RequestOverrideConfiguration sdkRequestOverrideConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
addApiName(Consumer<ApiName.Builder> apiNameConsumer)
Set the optional name of the higher level library that constructed the request.B
addApiName(ApiName apiName)
Set the optional name of the higher level library that constructed the request.B
addMetricPublisher(MetricPublisher metricPublisher)
Add a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this request.B
addPlugin(SdkPlugin plugin)
Add a plugin used to update the configuration used by this request.Duration
apiCallAttemptTimeout()
B
apiCallAttemptTimeout(Duration apiCallAttemptTimeout)
Configure the amount of time to wait for the http request to complete before giving up and timing out.Duration
apiCallTimeout()
B
apiCallTimeout(Duration apiCallTimeout)
Configure the amount of time to allow the client to complete the execution of an API call.List<ApiName>
apiNames()
The optional names of the higher level libraries that constructed the request.CompressionConfiguration
compressionConfiguration()
B
compressionConfiguration(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer)
Sets theCompressionConfiguration
for this request.B
compressionConfiguration(CompressionConfiguration compressionConfiguration)
Sets theCompressionConfiguration
for this request.EndpointProvider
endpointProvider()
B
endpointProvider(EndpointProvider endpointProvider)
Sets the endpointProvider to use for resolving the endpoint of the request.ExecutionAttributes
executionAttributes()
B
executionAttributes(ExecutionAttributes executionAttributes)
Sets the additional execution attributes collection for this request.Map<String,List<String>>
headers()
Optional additional headers to be added to the HTTP request.B
headers(Map<String,List<String>> headers)
Add additional headers to be set on the HTTP request.List<MetricPublisher>
metricPublishers()
B
metricPublishers(List<MetricPublisher> metricPublishers)
Sets the metric publishers for publishing the metrics collected for this request.List<SdkPlugin>
plugins()
Returns the list of registered pluginsB
plugins(List<SdkPlugin> plugins)
Sets the plugins used to update the configuration used by this request.<T> B
putExecutionAttribute(ExecutionAttribute<T> executionAttribute, T value)
Add an execution attribute to the existing collection of execution attributes.B
putHeader(String name, List<String> values)
Add a single header with multiple values to be set on the HTTP request.B
putRawQueryParameter(String name, List<String> values)
Add a single query parameter with multiple values to be set on the HTTP request.Map<String,List<String>>
rawQueryParameters()
Optional additional query parameters to be added to the HTTP request.B
rawQueryParameters(Map<String,List<String>> rawQueryParameters)
Configure query parameters to be set on the HTTP request.void
setApiCallAttemptTimeout(Duration apiCallAttemptTimeout)
void
setApiCallTimeout(Duration apiCallTimeout)
void
setEndpointProvider(EndpointProvider endpointProvider)
void
setExecutionAttributes(ExecutionAttributes executionAttributes)
void
setMetricPublishers(List<MetricPublisher> metricPublishers)
void
setSigner(Signer signer)
Signer
signer()
B
signer(Signer signer)
Sets the signer to use for signing the request.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.RequestOverrideConfiguration.Builder
build, putHeader, putRawQueryParameter
-
-
-
-
Constructor Detail
-
BuilderImpl
protected BuilderImpl()
-
BuilderImpl
protected BuilderImpl(RequestOverrideConfiguration sdkRequestOverrideConfig)
-
-
Method Detail
-
headers
public Map<String,List<String>> headers()
Description copied from interface:RequestOverrideConfiguration.Builder
Optional additional headers to be added to the HTTP request.- Specified by:
headers
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Returns:
- The optional additional headers.
-
putHeader
public B putHeader(String name, List<String> values)
Description copied from interface:RequestOverrideConfiguration.Builder
Add a single header with multiple values to be set on the HTTP request.This overrides any values for the given header set on the request by default by the SDK, as well as header overrides set at the client level using
ClientOverrideConfiguration
.This overrides any values already configured with this header name in the builder.
- Specified by:
putHeader
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
name
- The name of the header.values
- The values of the header.- Returns:
- This object for method chaining.
-
headers
public B headers(Map<String,List<String>> headers)
Description copied from interface:RequestOverrideConfiguration.Builder
Add additional headers to be set on the HTTP request.This overrides any values for the given headers set on the request by default by the SDK, as well as header overrides set at the client level using
ClientOverrideConfiguration
.This completely overrides any values currently configured in the builder.
- Specified by:
headers
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
headers
- The set of additional headers.- Returns:
- This object for method chaining.
-
rawQueryParameters
public Map<String,List<String>> rawQueryParameters()
Description copied from interface:RequestOverrideConfiguration.Builder
Optional additional query parameters to be added to the HTTP request.- Specified by:
rawQueryParameters
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Returns:
- The optional additional query parameters.
-
putRawQueryParameter
public B putRawQueryParameter(String name, List<String> values)
Description copied from interface:RequestOverrideConfiguration.Builder
Add a single query parameter with multiple values to be set on the HTTP request.This overrides any values already configured with this query name in the builder.
- Specified by:
putRawQueryParameter
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
name
- The query parameter name.values
- The query parameter values.- Returns:
- This object for method chaining.
-
rawQueryParameters
public B rawQueryParameters(Map<String,List<String>> rawQueryParameters)
Description copied from interface:RequestOverrideConfiguration.Builder
Configure query parameters to be set on the HTTP request.This completely overrides any query parameters currently configured in the builder.
- Specified by:
rawQueryParameters
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
rawQueryParameters
- The set of additional query parameters.- Returns:
- This object for method chaining.
-
apiNames
public List<ApiName> apiNames()
Description copied from interface:RequestOverrideConfiguration.Builder
The optional names of the higher level libraries that constructed the request.- Specified by:
apiNames
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Returns:
- The names of the libraries.
-
addApiName
public B addApiName(ApiName apiName)
Description copied from interface:RequestOverrideConfiguration.Builder
Set the optional name of the higher level library that constructed the request.- Specified by:
addApiName
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
apiName
- The name of the library.- Returns:
- This object for method chaining.
-
addApiName
public B addApiName(Consumer<ApiName.Builder> apiNameConsumer)
Description copied from interface:RequestOverrideConfiguration.Builder
Set the optional name of the higher level library that constructed the request.- Specified by:
addApiName
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
apiNameConsumer
- AConsumer
that accepts aApiName.Builder
.- Returns:
- This object for method chaining.
-
apiCallTimeout
public B apiCallTimeout(Duration apiCallTimeout)
Description copied from interface:RequestOverrideConfiguration.Builder
Configure the amount of time to allow the client to complete the execution of an API call. This timeout covers the entire client execution except for marshalling. This includes request handler execution, all HTTP requests including retries, unmarshalling, etc. This value should always be positive, if present.The api call 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
RequestOverrideConfiguration.Builder.apiCallAttemptTimeout()
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 'api call' time).Note that this timeout takes precedence over the value configured at client level via
ClientOverrideConfiguration.Builder.apiCallTimeout(Duration)
.- Specified by:
apiCallTimeout
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- See Also:
RequestOverrideConfiguration.apiCallTimeout()
-
setApiCallTimeout
public void setApiCallTimeout(Duration apiCallTimeout)
-
apiCallTimeout
public Duration apiCallTimeout()
- Specified by:
apiCallTimeout
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
apiCallAttemptTimeout
public B apiCallAttemptTimeout(Duration apiCallAttemptTimeout)
Description copied from interface:RequestOverrideConfiguration.Builder
Configure the amount of time to wait for the http request to complete before giving up and timing out. This value should always be positive, if present.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.
This may be used together with
RequestOverrideConfiguration.Builder.apiCallTimeout()
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 'api call' time).Note that this timeout takes precedence over the value configured at client level via
ClientOverrideConfiguration.Builder.apiCallAttemptTimeout(Duration)
.- Specified by:
apiCallAttemptTimeout
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- See Also:
RequestOverrideConfiguration.apiCallAttemptTimeout()
-
setApiCallAttemptTimeout
public void setApiCallAttemptTimeout(Duration apiCallAttemptTimeout)
-
apiCallAttemptTimeout
public Duration apiCallAttemptTimeout()
- Specified by:
apiCallAttemptTimeout
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
signer
public B signer(Signer signer)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets the signer to use for signing the request. This signer get priority over the signer set on the client while signing the requests. If this value is null, then the client level signer is used for signing the request.- Specified by:
signer
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
signer
- Signer for signing the request- Returns:
- This object for method chaining
-
setSigner
public void setSigner(Signer signer)
-
signer
public Signer signer()
- Specified by:
signer
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
metricPublishers
public B metricPublishers(List<MetricPublisher> metricPublishers)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets the metric publishers for publishing the metrics collected for this request. This list supersedes the metric publisher set on the client.- Specified by:
metricPublishers
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
metricPublishers
- The list metric publisher for this request.- Returns:
- This object for method chaining.
-
addMetricPublisher
public B addMetricPublisher(MetricPublisher metricPublisher)
Description copied from interface:RequestOverrideConfiguration.Builder
Add a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this request.- Specified by:
addMetricPublisher
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
metricPublisher
- The metric publisher to add.
-
setMetricPublishers
public void setMetricPublishers(List<MetricPublisher> metricPublishers)
-
metricPublishers
public List<MetricPublisher> metricPublishers()
- Specified by:
metricPublishers
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
executionAttributes
public B executionAttributes(ExecutionAttributes executionAttributes)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets the additional execution attributes collection for this request.- Specified by:
executionAttributes
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
executionAttributes
- Execution attributes for this request- Returns:
- This object for method chaining.
-
putExecutionAttribute
public <T> B putExecutionAttribute(ExecutionAttribute<T> executionAttribute, T value)
Description copied from interface:RequestOverrideConfiguration.Builder
Add an execution attribute to the existing collection of execution attributes.- Specified by:
putExecutionAttribute
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
executionAttribute
- The execution attribute objectvalue
- The value of the execution attribute.
-
executionAttributes
public ExecutionAttributes executionAttributes()
- Specified by:
executionAttributes
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
setExecutionAttributes
public void setExecutionAttributes(ExecutionAttributes executionAttributes)
-
endpointProvider
public B endpointProvider(EndpointProvider endpointProvider)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets the endpointProvider to use for resolving the endpoint of the request. This endpointProvider gets priority over the endpointProvider set on the client while resolving the endpoint for the requests. If this value is null, then the client level endpointProvider is used for resolving the endpoint.- Specified by:
endpointProvider
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
endpointProvider
- Endpoint Provider that will override the resolving the endpoint for the request.- Returns:
- This object for method chaining
-
setEndpointProvider
public void setEndpointProvider(EndpointProvider endpointProvider)
-
endpointProvider
public EndpointProvider endpointProvider()
- Specified by:
endpointProvider
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
compressionConfiguration
public B compressionConfiguration(CompressionConfiguration compressionConfiguration)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets theCompressionConfiguration
for this request. The order of precedence, from highest to lowest, for this setting is: 1) Per request configuration 2) Client configuration 3) Environment variables 4) Profile setting.- Specified by:
compressionConfiguration
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
compressionConfiguration
- Request compression configuration object for this request.
-
compressionConfiguration
public B compressionConfiguration(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets theCompressionConfiguration
for this request. The order of precedence, from highest to lowest, for this setting is: 1) Per request configuration 2) Client configuration 3) Environment variables 4) Profile setting.- Specified by:
compressionConfiguration
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
compressionConfigurationConsumer
- AConsumer
that accepts aCompressionConfiguration.Builder
- Returns:
- This object for method chaining
-
compressionConfiguration
public CompressionConfiguration compressionConfiguration()
- Specified by:
compressionConfiguration
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
plugins
public B plugins(List<SdkPlugin> plugins)
Description copied from interface:RequestOverrideConfiguration.Builder
Sets the plugins used to update the configuration used by this request.- Specified by:
plugins
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
plugins
- The list of plugins for this request.- Returns:
- This object for method chaining.
-
addPlugin
public B addPlugin(SdkPlugin plugin)
Description copied from interface:RequestOverrideConfiguration.Builder
Add a plugin used to update the configuration used by this request.- Specified by:
addPlugin
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- Parameters:
plugin
- The plugin to add.
-
plugins
public List<SdkPlugin> plugins()
Description copied from interface:RequestOverrideConfiguration.Builder
Returns the list of registered plugins- Specified by:
plugins
in interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
-