|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.amazonaws.DefaultRequest<T>
public class DefaultRequest<T>
Default implementation of the Request interface.
This class is only intended for internal use inside the AWS client libraries. Callers shouldn't ever interact directly with objects of this class.
| Constructor Summary | |
|---|---|
DefaultRequest(AmazonWebServiceRequest 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. |
|
| Method Summary | |
|---|---|
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. |
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. |
AmazonWebServiceRequest |
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. |
void |
setEndpoint(URI endpoint)
Sets the service endpoint (ex: "https://ec2.amazonaws.com") to which this request should be sent. |
void |
setResourcePath(String resourcePath)
Sets the path to the resource being requested. |
Request<T> |
withParameter(String name,
String value)
Adds the specified request parameter to this request, and returns the updated request object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRequest(AmazonWebServiceRequest 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.| Method Detail |
|---|
public AmazonWebServiceRequest getOriginalRequest()
getOriginalRequest in interface Request<T>
public void addHeader(String name,
String value)
Request
addHeader in interface Request<T>name - The name of the header to add.value - The header's value.Request.addHeader(java.lang.String, java.lang.String)public Map<String,String> getHeaders()
Request
getHeaders in interface Request<T>Request.getHeaders()public void setResourcePath(String resourcePath)
Request
setResourcePath in interface Request<T>resourcePath - The path to the resource being requested.Request.setResourcePath(java.lang.String)public String getResourcePath()
Request
getResourcePath in interface Request<T>Request.getResourcePath()
public void addParameter(String name,
String value)
Request
addParameter in interface Request<T>name - The name of the request parameter.value - The value of the request parameter.Request.addParameter(java.lang.String, java.lang.String)public Map<String,String> getParameters()
Request
getParameters in interface Request<T>Request.getParameters()
public Request<T> withParameter(String name,
String value)
Request
withParameter in interface Request<T>name - The name of the request parameter.value - The value of the request parameter.
Request.withParameter(java.lang.String, java.lang.String)public void setEndpoint(URI endpoint)
Request
setEndpoint in interface Request<T>endpoint - The service endpoint to which this request should be sent.Request.setEndpoint(java.net.URI)public URI getEndpoint()
Request
getEndpoint in interface Request<T>Request.getEndpoint()public String getServiceName()
Request
getServiceName in interface Request<T>Request.getServiceName()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||