@NotThreadSafe public class DefaultRequest<T> extends Object implements Request<T>
This class is only intended for internal use inside the AWS client libraries. Callers shouldn't ever interact directly with objects of this class.
| 构造器和说明 | 
|---|
DefaultRequest(SCSWebServiceRequest originalRequest,
              String serviceName)
Constructs a new DefaultRequest with the specified service name and the
 original, user facing request object. 
 | 
DefaultRequest(String serviceName)
Constructs a new DefaultRequest with the specified service name and no
 specified original, user facing request object. 
 | 
| 限定符和类型 | 方法和说明 | 
|---|---|
void | 
addHeader(String name,
         String value)
Adds the specified header to this request. 
 | 
void | 
addParameter(String name,
            String value)
Adds the specified request parameter to this request. 
 | 
InputStream | 
getContent()
Returns the optional stream containing the payload data to include for
 this request. 
 | 
URI | 
getEndpoint()
Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which
 this request should be sent. 
 | 
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. 
 | 
SCSWebServiceRequest | 
getOriginalRequest()
Returns the original, user facing request object which this internal
 request object is representing. 
 | 
Map<String,String> | 
getParameters()
Returns a map of all parameters in this request. 
 | 
String | 
getResourcePath()
Returns the path to the resource being requested. 
 | 
String | 
getServiceName()
Returns the name of the Amazon service this request is for. 
 | 
int | 
getTimeOffset()
Returns the optional value for time offset for this 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 | 
setParameters(Map<String,String> parameters)
Sets all parameters, clearing any existing values. 
 | 
void | 
setResourcePath(String resourcePath)
Sets the path to the resource being requested. 
 | 
void | 
setTimeOffset(int timeOffset)
Sets the optional value for time offset for this request. 
 | 
String | 
toString()  | 
Request<T> | 
withParameter(String name,
             String value)
Adds the specified request parameter to this request, and returns the
 updated request object. 
 | 
Request<T> | 
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this request. 
 | 
public DefaultRequest(SCSWebServiceRequest originalRequest, String serviceName)
serviceName - The name of the service to which this request is being sent.originalRequest - The original, user facing, AWS request being represented by
            this internal request object.public DefaultRequest(String serviceName)
serviceName - The name of the service to which this request is being sent.public SCSWebServiceRequest getOriginalRequest()
getOriginalRequest 在接口中 Request<T>public void addHeader(String name, String value)
Requestpublic Map<String,String> getHeaders()
RequestgetHeaders 在接口中 Request<T>com.amazonaws.Request#getHeaders()public void setResourcePath(String resourcePath)
RequestsetResourcePath 在接口中 Request<T>resourcePath - The path to the resource being requested.com.amazonaws.Request#setResourcePath(java.lang.String)public String getResourcePath()
RequestgetResourcePath 在接口中 Request<T>com.amazonaws.Request#getResourcePath()public void addParameter(String name, String value)
RequestaddParameter 在接口中 Request<T>name - The name of the request parameter.value - The value of the request parameter.com.amazonaws.Request#addParameter(java.lang.String, java.lang.String)public Map<String,String> getParameters()
RequestgetParameters 在接口中 Request<T>com.amazonaws.Request#getParameters()public Request<T> withParameter(String name, String value)
RequestwithParameter 在接口中 Request<T>name - The name of the request parameter.value - The value of the request parameter.com.amazonaws.Request#withParameter(java.lang.String, java.lang.String)public HttpMethodName getHttpMethod()
RequestgetHttpMethod 在接口中 Request<T>com.amazonaws.Request#getHttpMethod()public void setHttpMethod(HttpMethodName httpMethod)
RequestsetHttpMethod 在接口中 Request<T>httpMethod - The HTTP method to use when sending this request.com.amazonaws.Request#setHttpMethod(com.amazonaws.http.HttpMethodName)public void setEndpoint(URI endpoint)
RequestsetEndpoint 在接口中 Request<T>endpoint - The service endpoint to which this request should be sent.com.amazonaws.Request#setEndpoint(java.net.URI)public URI getEndpoint()
RequestgetEndpoint 在接口中 Request<T>com.amazonaws.Request#getEndpoint()public String getServiceName()
RequestgetServiceName 在接口中 Request<T>com.amazonaws.Request#getServiceName()public InputStream getContent()
RequestgetContent 在接口中 Request<T>com.amazonaws.Request#getContent()public void setContent(InputStream content)
RequestsetContent 在接口中 Request<T>content - The optional stream containing the payload data to include for
            this request.com.amazonaws.Request#setContent(java.io.InputStream)public void setHeaders(Map<String,String> headers)
RequestsetHeaders 在接口中 Request<T>com.amazonaws.Request#setHeaders(java.util.Map)public void setParameters(Map<String,String> parameters)
RequestsetParameters 在接口中 Request<T>com.amazonaws.Request#setParameters(java.util.Map)public int getTimeOffset()
RequestgetTimeOffset 在接口中 Request<T>com.amazonaws.Request#getTimeOffsetpublic void setTimeOffset(int timeOffset)
RequestsetTimeOffset 在接口中 Request<T>timeOffset - The optional value for time offset (in seconds) for this request.Request.setTimeOffset(int)public Request<T> withTimeOffset(int timeOffset)
RequestwithTimeOffset 在接口中 Request<T>Request.setTimeOffset(int)Copyright © 2016. All rights reserved.