@NotThreadSafe public class ExecutionContext extends Object
Constructor and Description |
---|
ExecutionContext()
For testing purposes.
|
ExecutionContext(boolean isMetricEnabled)
For testing purposes.
|
ExecutionContext(List<RequestHandler2> requestHandler2s,
boolean isMetricEnabled,
AmazonWebServiceClient awsClient) |
Modifier and Type | Method and Description |
---|---|
com.amazonaws.retry.internal.AuthErrorRetryStrategy |
getAuthErrorRetryStrategy()
Returns the retry strategy for auth errors.
|
protected AmazonWebServiceClient |
getAwsClient() |
AWSRequestMetrics |
getAwsRequestMetrics() |
ClientExecutionAbortTrackerTask |
getClientExecutionTrackerTask() |
String |
getContextUserAgent() |
AWSCredentials |
getCredentials()
Deprecated.
in favor of
getCredentialsProvider() |
AWSCredentialsProvider |
getCredentialsProvider()
Returns the credentials provider used for fetching the credentials.
|
List<RequestHandler2> |
getRequestHandler2s() |
Signer |
getSignerByURI(URI uri)
Returns the signer for the given uri.
|
void |
markRetryCapacityConsumed()
Marks that a retry during this request lifecycle has consumed retry capacity.
|
boolean |
retryCapacityConsumed()
Returns whether retry capacity was consumed during this request lifecycle.
|
void |
setAuthErrorRetryStrategy(com.amazonaws.retry.internal.AuthErrorRetryStrategy authErrorRetryStrategy)
Sets the optional auth error retry strategy for this request execution.
|
void |
setClientExecutionTrackerTask(ClientExecutionAbortTrackerTask clientExecutionTrackerTask) |
void |
setContextUserAgent(String contextUserAgent) |
void |
setCredentials(AWSCredentials credentials)
Deprecated.
in favor of
setCredentialsProvider(AWSCredentialsProvider) |
void |
setCredentialsProvider(AWSCredentialsProvider credentialsProvider)
Sets the credentials provider used for fetching the credentials.
|
void |
setSigner(Signer signer)
There is in general no need to set the signer in the execution context, since the signer for
each request may differ depending on the URI of the request.
|
public ExecutionContext(boolean isMetricEnabled)
public ExecutionContext()
public ExecutionContext(List<RequestHandler2> requestHandler2s, boolean isMetricEnabled, AmazonWebServiceClient awsClient)
public String getContextUserAgent()
public void setContextUserAgent(String contextUserAgent)
public List<RequestHandler2> getRequestHandler2s()
public AWSRequestMetrics getAwsRequestMetrics()
protected AmazonWebServiceClient getAwsClient()
public void setSigner(Signer signer)
public boolean retryCapacityConsumed()
public void markRetryCapacityConsumed()
public Signer getSignerByURI(URI uri)
@Deprecated public AWSCredentials getCredentials()
getCredentialsProvider()
Returns the credentials used to sign the associated request.
This method is deprecated as the provider needs to be used every time we fetch the credentials.
@Deprecated public void setCredentials(AWSCredentials credentials)
setCredentialsProvider(AWSCredentialsProvider)
Sets the credentials used to sign the associated request. If no credentials are specified as part of a request's ExecutionContext, then the runtime layer will not attempt to sign (or resign on retries) requests.
This method is deprecated as the provider needs to be used every time we fetch the credentials.
credentials
- The optional credentials used to sign the associated request.public void setCredentialsProvider(AWSCredentialsProvider credentialsProvider)
credentialsProvider
- the credentials provider to fetch AWSCredentials
public AWSCredentialsProvider getCredentialsProvider()
AWSCredentials
public com.amazonaws.retry.internal.AuthErrorRetryStrategy getAuthErrorRetryStrategy()
Note that this will be checked BEFORE the HTTP client consults the user-specified RetryPolicy. i.e. if the configured AuthErrorRetryStrategy says the request should be retried, the retry will be performed internally and the effect is transparent to the user's RetryPolicy.
public void setAuthErrorRetryStrategy(com.amazonaws.retry.internal.AuthErrorRetryStrategy authErrorRetryStrategy)
getAuthErrorRetryStrategy()
public ClientExecutionAbortTrackerTask getClientExecutionTrackerTask()
public void setClientExecutionTrackerTask(ClientExecutionAbortTrackerTask clientExecutionTrackerTask)
Copyright © 2017. All rights reserved.