protected abstract static class RequestOverrideConfiguration.BuilderImpl<B extends RequestOverrideConfiguration.Builder> extends Object implements RequestOverrideConfiguration.Builder<B>
| Modifier | Constructor and Description |
|---|---|
protected |
BuilderImpl() |
protected |
BuilderImpl(RequestOverrideConfiguration sdkRequestOverrideConfig) |
| Modifier and Type | Method and Description |
|---|---|
B |
addApiName(ApiName apiName)
Set the optional name of the higher level library that constructed the request.
|
B |
addApiName(Consumer<ApiName.Builder> apiNameConsumer)
Set the optional name of the higher level library that constructed the 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.
|
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.
|
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 |
setSigner(Signer signer) |
Signer |
signer() |
B |
signer(Signer signer)
Sets the signer to use for signing the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuild, putHeader, putRawQueryParameterprotected BuilderImpl()
protected BuilderImpl(RequestOverrideConfiguration sdkRequestOverrideConfig)
public Map<String,List<String>> headers()
RequestOverrideConfiguration.Builderheaders in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>public B putHeader(String name, List<String> values)
RequestOverrideConfiguration.BuilderThis overrides any values already configured with this header name in the builder.
putHeader in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>name - The name of the header.values - The values of the header.public B headers(Map<String,List<String>> headers)
RequestOverrideConfiguration.BuilderThis completely overrides any values currently configured in the builder.
headers in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>headers - The set of additional headers.public Map<String,List<String>> rawQueryParameters()
RequestOverrideConfiguration.BuilderrawQueryParameters in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>public B putRawQueryParameter(String name, List<String> values)
RequestOverrideConfiguration.BuilderThis overrides any values already configured with this query name in the builder.
putRawQueryParameter in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>name - The query parameter name.values - The query parameter values.public B rawQueryParameters(Map<String,List<String>> rawQueryParameters)
RequestOverrideConfiguration.BuilderThis completely overrides any query parameters currently configured in the builder.
rawQueryParameters in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>rawQueryParameters - The set of additional query parameters.public List<ApiName> apiNames()
RequestOverrideConfiguration.BuilderapiNames in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>public B addApiName(ApiName apiName)
RequestOverrideConfiguration.BuilderaddApiName in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>apiName - The name of the library.public B addApiName(Consumer<ApiName.Builder> apiNameConsumer)
RequestOverrideConfiguration.BuilderaddApiName in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>apiNameConsumer - A Consumer that accepts a ApiName.Builder.public B apiCallTimeout(Duration apiCallTimeout)
RequestOverrideConfiguration.BuilderThe 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).
apiCallTimeout in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>RequestOverrideConfiguration.apiCallTimeout()public void setApiCallTimeout(Duration apiCallTimeout)
public Duration apiCallTimeout()
apiCallTimeout in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>public B apiCallAttemptTimeout(Duration apiCallAttemptTimeout)
RequestOverrideConfiguration.BuilderThe 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).
apiCallAttemptTimeout in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>RequestOverrideConfiguration.apiCallAttemptTimeout()public void setApiCallAttemptTimeout(Duration apiCallAttemptTimeout)
public Duration apiCallAttemptTimeout()
apiCallAttemptTimeout in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>public B signer(Signer signer)
RequestOverrideConfiguration.Buildersigner in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>signer - Signer for signing the requestpublic void setSigner(Signer signer)
public Signer signer()
signer in interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>Copyright © 2019. All rights reserved.