com.amazonaws.http
Class ExecutionContext

java.lang.Object
  extended by com.amazonaws.http.ExecutionContext

@NotThreadSafe
public class ExecutionContext
extends Object


Constructor Summary
ExecutionContext()
          For testing purposes.
ExecutionContext(boolean isMetricEnabled)
          For testing purposes.
ExecutionContext(List<RequestHandler2> requestHandler2s, boolean isMetricEnabled, AmazonWebServiceClient awsClient)
           
 
Method Summary
 AWSRequestMetrics getAwsRequestMetrics()
           
 String getContextUserAgent()
           
 AWSCredentials getCredentials()
          Returns the optional credentials used to sign the associated request.
 List<RequestHandler2> getRequestHandler2s()
           
 Signer getSignerByURI(URI uri)
          Returns the signer for the given uri.
 void setContextUserAgent(String contextUserAgent)
           
 void setCredentials(AWSCredentials credentials)
          Sets the optional credentials used to sign the associated request.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContext

public ExecutionContext(boolean isMetricEnabled)
For testing purposes.


ExecutionContext

public ExecutionContext()
For testing purposes.


ExecutionContext

public ExecutionContext(List<RequestHandler2> requestHandler2s,
                        boolean isMetricEnabled,
                        AmazonWebServiceClient awsClient)
Method Detail

getContextUserAgent

public String getContextUserAgent()

setContextUserAgent

public void setContextUserAgent(String contextUserAgent)

getRequestHandler2s

public List<RequestHandler2> getRequestHandler2s()

getAwsRequestMetrics

public AWSRequestMetrics getAwsRequestMetrics()

setSigner

public 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. The exception is S3 where the signer is currently determined only when the S3 client is constructed. Hence the need for this method. We may consider supporting a per request level signer determination for S3 later on.


getSignerByURI

public Signer getSignerByURI(URI uri)
Returns the signer for the given uri. Note S3 in particular overrides this method.


getCredentials

public AWSCredentials getCredentials()
Returns the optional credentials used to sign the associated request.

Returns:
The optional credentials used to sign the associated request.

setCredentials

public void setCredentials(AWSCredentials credentials)
Sets the optional 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.

Parameters:
credentials - The optional credentials used to sign the associated request.


Copyright © 2016. All rights reserved.