public class EmptyHttpRequest extends Object implements Request<Object>
| Constructor and Description | 
|---|
EmptyHttpRequest(String endpoint,
                HttpMethodName httpMethod)  | 
EmptyHttpRequest(String endpoint,
                HttpMethodName httpMethod,
                InputStream payload)  | 
| Modifier and Type | Method and Description | 
|---|---|
<X> void | 
addHandlerContext(HandlerContextKey<X> key,
                 X value)
Adds a context to that is visible to all  
RequestHandler2s. | 
void | 
addHeader(String name,
         String value)
Sets the specified header for this request. 
 | 
void | 
addParameter(String name,
            String value)
Adds the specified request parameter to this request. 
 | 
void | 
addParameters(String name,
             List<String> values)
Adds the specified request parameter and list of values to this request. 
 | 
AWSRequestMetrics | 
getAWSRequestMetrics()
Returns the request metrics. 
 | 
InputStream | 
getContent()
Returns the optional stream containing the payload data to include for
 this request. 
 | 
InputStream | 
getContentUnwrapped()
Returns the optional raw stream containing the payload data to include
 for this request, with all progress stream wrappers. 
 | 
URI | 
getEndpoint()
Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which
 this request should be sent. 
 | 
<X> X | 
getHandlerContext(HandlerContextKey<X> key)
Return the context for the given key if present; else return null. 
 | 
Map<String,String> | 
getHeaders()
Returns a map of all the headers included in this request. 
 | 
HttpMethodName | 
getHttpMethod()
Returns the HTTP method (GET, POST, etc) to use when sending this
 request. 
 | 
AmazonWebServiceRequest | 
getOriginalRequest()
Returns the original, user facing request object which this internal
 request object is representing. 
 | 
Object | 
getOriginalRequestObject()
Returns the original, user facing request object which this internal
 request object is representing. 
 | 
Map<String,List<String>> | 
getParameters()
Returns a map of all parameters in this request. 
 | 
ReadLimitInfo | 
getReadLimitInfo()
Returns the read limit info about the original request. 
 | 
String | 
getResourcePath()
Returns the path to the resource being requested. 
 | 
String | 
getServiceName()  | 
int | 
getTimeOffset()
Returns the optional value for time offset for this request. 
 | 
void | 
setAWSRequestMetrics(AWSRequestMetrics metrics)
Bind the request metrics to the request. 
 | 
void | 
setContent(InputStream content)
Sets the optional stream containing the payload data to include for this
 request. 
 | 
void | 
setEndpoint(URI endpoint)
Sets the service endpoint (ex: "https://ec2.amazonaws.com") to which this
 request should be sent. 
 | 
void | 
setHeaders(Map<String,String> headers)
Sets all headers, clearing any existing ones. 
 | 
void | 
setHttpMethod(HttpMethodName httpMethod)
Sets the HTTP method (GET, POST, etc) to use when sending this request. 
 | 
void | 
setOriginalRequest(AmazonWebServiceRequest originalRequest)  | 
void | 
setParameters(Map<String,List<String>> parameters)
Sets all parameters, clearing any existing values. 
 | 
void | 
setResourcePath(String path)
Sets the path to the resource being requested. 
 | 
void | 
setTimeOffset(int timeOffset)
Sets the optional value for time offset for this request. 
 | 
Request<Object> | 
withParameter(String name,
             String value)
Adds the specified request parameter to this request, and returns the
 updated request object. 
 | 
Request<Object> | 
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this request. 
 | 
public EmptyHttpRequest(String endpoint, HttpMethodName httpMethod)
public EmptyHttpRequest(String endpoint, HttpMethodName httpMethod, InputStream payload)
public void addHeader(String name, String value)
SignableRequestaddHeader in interface SignableRequest<Object>name - The name of the header to set.value - The header's value.public Map<String,String> getHeaders()
ImmutableRequestgetHeaders in interface ImmutableRequest<Object>public void setHeaders(Map<String,String> headers)
RequestsetHeaders in interface Request<Object>public void setResourcePath(String path)
RequestsetResourcePath in interface Request<Object>path - The path to the resource being requested.public String getResourcePath()
ImmutableRequestgetResourcePath in interface ImmutableRequest<Object>public void addParameter(String name, String value)
SignableRequestaddParameter in interface SignableRequest<Object>name - The name of the request parameter.value - The value of the request parameter.public Request<Object> withParameter(String name, String value)
RequestwithParameter in interface Request<Object>name - The name of the request parameter.value - The value of the request parameter.public void addParameters(String name, List<String> values)
RequestaddParameters in interface Request<Object>name - The name of the request parameter.values - The value of the request parameter.public Map<String,List<String>> getParameters()
ImmutableRequestgetParameters in interface ImmutableRequest<Object>public void setParameters(Map<String,List<String>> parameters)
RequestsetParameters in interface Request<Object>public URI getEndpoint()
ImmutableRequestgetEndpoint in interface ImmutableRequest<Object>public void setEndpoint(URI endpoint)
RequestsetEndpoint in interface Request<Object>endpoint - The service endpoint to which this request should be sent.public HttpMethodName getHttpMethod()
ImmutableRequestgetHttpMethod in interface ImmutableRequest<Object>public void setHttpMethod(HttpMethodName httpMethod)
RequestsetHttpMethod in interface Request<Object>httpMethod - The HTTP method to use when sending this request.public InputStream getContent()
ImmutableRequestgetContent in interface ImmutableRequest<Object>public void setContent(InputStream content)
SignableRequestsetContent in interface SignableRequest<Object>content - The optional stream containing the payload data to include for
            this request.public String getServiceName()
getServiceName in interface Request<Object>AmazonWebServiceClient.getServiceName() which is used for
         signing purpose.AmazonServiceException#getServiceName()}, 
AWSRequestMetrics.Field#ServiceName}public AmazonWebServiceRequest getOriginalRequest()
RequestgetOriginalRequest in interface Request<Object>public void setOriginalRequest(AmazonWebServiceRequest originalRequest)
public int getTimeOffset()
ImmutableRequestgetTimeOffset in interface ImmutableRequest<Object>public void setTimeOffset(int timeOffset)
RequestsetTimeOffset in interface Request<Object>timeOffset - The optional value for time offset (in seconds) for this request.public Request<Object> withTimeOffset(int timeOffset)
RequestwithTimeOffset in interface Request<Object>public AWSRequestMetrics getAWSRequestMetrics()
RequestgetAWSRequestMetrics in interface Request<Object>public void setAWSRequestMetrics(AWSRequestMetrics metrics)
RequestsetAWSRequestMetrics in interface Request<Object>public ReadLimitInfo getReadLimitInfo()
ImmutableRequestgetReadLimitInfo in interface ImmutableRequest<Object>public InputStream getContentUnwrapped()
ImmutableRequestgetContentUnwrapped in interface ImmutableRequest<Object>public Object getOriginalRequestObject()
ImmutableRequestgetOriginalRequestObject in interface ImmutableRequest<Object>Object.public <X> void addHandlerContext(HandlerContextKey<X> key, X value)
HandlerContextAwareRequestHandler2s.
 Note that, context added here will available only for the scope of
 the request execution and will not be marshalled over the wire.addHandlerContext in interface HandlerContextAwarekey - the key for the property being set in the request.value - the value for the property being set in the request.public <X> X getHandlerContext(HandlerContextKey<X> key)
HandlerContextAwaregetHandlerContext in interface HandlerContextAwarekey - the key for the contextCopyright © 2021. All rights reserved.