Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amazonaws
Class DefaultRequest<T>

    java.lang.Object
      com.amazonaws.DefaultRequest<T>

All Implemented Interfaces:
  Request<T>

    public class DefaultRequest<T>

extends Object
implements Request<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

### DefaultRequest

    public DefaultRequest(AmazonWebServiceRequest originalRequest,
                          String serviceName)

  Constructs a new DefaultRequest with the specified service name and the original, user facing request object.

  Parameters:
    `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.

### DefaultRequest

    public DefaultRequest(String serviceName)

  Constructs a new DefaultRequest with the specified service name and no specified original, user facing request object.

  Parameters:
    `serviceName` - The name of the service to which this request is being sent.

Method Detail

### getOriginalRequest

    public AmazonWebServiceRequest getOriginalRequest()

  Returns the original, user facing request object which this internal request object is representing.

  Specified by:
    `getOriginalRequest` in interface `Request<T>`
  Returns:
    The original, user facing request object which this request object is representing.

### addHeader

    public void addHeader(String name,
                          String value)

  Description copied from interface: `Request`
  Adds the specified header to this request.

  Specified by:
    `addHeader` in interface `Request<T>`
  Parameters:
    `name` - The name of the header to add.
    `value` - The header's value.
  See Also:
    `Request.addHeader(java.lang.String, java.lang.String)`

### getHeaders

    public Map<String,String> getHeaders()

  Description copied from interface: `Request`
  Returns a map of all the headers included in this request.

  Specified by:
    `getHeaders` in interface `Request<T>`
  Returns:
    A map of all the headers included in this request.
  See Also:
    `Request.getHeaders()`

### setResourcePath

    public void setResourcePath(String resourcePath)

  Description copied from interface: `Request`
  Sets the path to the resource being requested.

  Specified by:
    `setResourcePath` in interface `Request<T>`
  Parameters:
    `resourcePath` - The path to the resource being requested.
  See Also:
    `Request.setResourcePath(java.lang.String)`

### getResourcePath

    public String getResourcePath()

  Description copied from interface: `Request`
  Returns the path to the resource being requested.

  Specified by:
    `getResourcePath` in interface `Request<T>`
  Returns:
    The path to the resource being requested.
  See Also:
    `Request.getResourcePath()`

### addParameter

    public void addParameter(String name,
                             String value)

  Description copied from interface: `Request`
  Adds the specified request parameter to this request.

  Specified by:
    `addParameter` in interface `Request<T>`
  Parameters:
    `name` - The name of the request parameter.
    `value` - The value of the request parameter.
  See Also:
    `Request.addParameter(java.lang.String, java.lang.String)`

### getParameters

    public Map<String,String> getParameters()

  Description copied from interface: `Request`
  Returns a map of all parameters in this request.

  Specified by:
    `getParameters` in interface `Request<T>`
  Returns:
    A map of all parameters in this request.
  See Also:
    `Request.getParameters()`

### withParameter

    public Request<T> withParameter(String name,
                                    String value)

  Description copied from interface: `Request`
  Adds the specified request parameter to this request, and returns the updated request object.

  Specified by:
    `withParameter` in interface `Request<T>`
  Parameters:
    `name` - The name of the request parameter.
    `value` - The value of the request parameter.
  Returns:
    The updated request object.
  See Also:
    `Request.withParameter(java.lang.String, java.lang.String)`

### setEndpoint

    public void setEndpoint(URI endpoint)

  Description copied from interface: `Request`
  Sets the service endpoint (ex: "https://ec2.amazonaws.com") to which this request should be sent.

  Specified by:
    `setEndpoint` in interface `Request<T>`
  Parameters:
    `endpoint` - The service endpoint to which this request should be sent.
  See Also:
    `Request.setEndpoint(java.net.URI)`

### getEndpoint

    public URI getEndpoint()

  Description copied from interface: `Request`
  Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which this request should be sent.

  Specified by:
    `getEndpoint` in interface `Request<T>`
  Returns:
    The service endpoint to which this request should be sent.
  See Also:
    `Request.getEndpoint()`

### getServiceName

    public String getServiceName()

  Description copied from interface: `Request`
  Returns the name of the Amazon service this request is for.

  Specified by:
    `getServiceName` in interface `Request<T>`
  Returns:
    The name of the Amazon service this request is for.
  See Also:
    `Request.getServiceName()`

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.