org.jboss.resteasy.util

## Class DelegatingHttpRequest

- java.lang.Object
- - org.jboss.resteasy.util.DelegatingHttpRequest

- All Implemented Interfaces:
    HttpRequest
  Direct Known Subclasses:
    PrefixedFormFieldsHttpRequest

      public class DelegatingHttpRequest
      extends Object
      implements HttpRequest

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelegatingHttpRequest(HttpRequest delegate)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `forward(String path)`
    `ResteasyAsynchronousContext` | `getAsyncContext()`
    `Object` | `getAttribute(String attribute)` Map of contextual data.
    `Enumeration<String>` | `getAttributeNames()`
    `MultivaluedMap<String,String>` | `getDecodedFormParameters()`
    `MultivaluedMap<String,String>` | `getFormParameters()` application/x-www-form-urlencoded parameters This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
    `HttpHeaders` | `getHttpHeaders()`
    `String` | `getHttpMethod()`
    `InputStream` | `getInputStream()`
    `MultivaluedMap<String,String>` | `getMutableHeaders()`
    `ResteasyUriInfo` | `getUri()` This method *MUST* always return the same instance.
    `boolean` | `isInitial()`
    `void` | `removeAttribute(String name)`
    `void` | `setAttribute(String name, Object value)`
    `void` | `setHttpMethod(String method)`
    `void` | `setInputStream(InputStream stream)` If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().
    `void` | `setRequestUri(URI requestUri)` Updates the object returned by `HttpRequest.getUri()`.
    `void` | `setRequestUri(URI baseUri, URI requestUri)` Updates the object returned by `HttpRequest.getUri()`.
    `boolean` | `wasForwarded()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DelegatingHttpRequest

          public DelegatingHttpRequest(HttpRequest delegate)

  - ### Method Detail

    - #### getMutableHeaders

          public MultivaluedMap<String,String> getMutableHeaders()

      Specified by:
        `getMutableHeaders` in interface `HttpRequest`

    - #### setHttpMethod

          public void setHttpMethod(String method)

      Specified by:
        `setHttpMethod` in interface `HttpRequest`

    - #### getUri

          public ResteasyUriInfo getUri()

      Description copied from interface: `HttpRequest`
      This method *MUST* always return the same instance.
      Specified by:
        `getUri` in interface `HttpRequest`

    - #### setRequestUri

          public void setRequestUri(URI requestUri)
                             throws IllegalStateException

      Description copied from interface: `HttpRequest`
      Updates the object returned by `HttpRequest.getUri()`.
      Specified by:
        `setRequestUri` in interface `HttpRequest`
      Throws:
        `IllegalStateException`

    - #### setRequestUri

          public void setRequestUri(URI baseUri,
                           URI requestUri)
                             throws IllegalStateException

      Description copied from interface: `HttpRequest`
      Updates the object returned by `HttpRequest.getUri()`.
      Specified by:
        `setRequestUri` in interface `HttpRequest`
      Throws:
        `IllegalStateException`

    - #### getHttpHeaders

          public HttpHeaders getHttpHeaders()

      Specified by:
        `getHttpHeaders` in interface `HttpRequest`

    - #### getInputStream

          public InputStream getInputStream()

      Specified by:
        `getInputStream` in interface `HttpRequest`

    - #### setInputStream

          public void setInputStream(InputStream stream)

      Description copied from interface: `HttpRequest`
      If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest
      Specified by:
        `setInputStream` in interface `HttpRequest`

    - #### getHttpMethod

          public String getHttpMethod()

      Specified by:
        `getHttpMethod` in interface `HttpRequest`

    - #### getFormParameters

          public MultivaluedMap<String,String> getFormParameters()

      Description copied from interface: `HttpRequest`
      application/x-www-form-urlencoded parameters

      This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
      Specified by:
        `getFormParameters` in interface `HttpRequest`
      Returns:
        null if no parameters, this is encoded map

    - #### getDecodedFormParameters

          public MultivaluedMap<String,String> getDecodedFormParameters()

      Specified by:
        `getDecodedFormParameters` in interface `HttpRequest`

    - #### getAttribute

          public Object getAttribute(String attribute)

      Description copied from interface: `HttpRequest`
      Map of contextual data. Similar to HttpServletRequest attributes
      Specified by:
        `getAttribute` in interface `HttpRequest`
      Returns:

    - #### setAttribute

          public void setAttribute(String name,
                          Object value)

      Specified by:
        `setAttribute` in interface `HttpRequest`

    - #### removeAttribute

          public void removeAttribute(String name)

      Specified by:
        `removeAttribute` in interface `HttpRequest`

    - #### getAttributeNames

          public Enumeration<String> getAttributeNames()

      Specified by:
        `getAttributeNames` in interface `HttpRequest`

    - #### isInitial

          public boolean isInitial()

      Specified by:
        `isInitial` in interface `HttpRequest`

    - #### getAsyncContext

          public ResteasyAsynchronousContext getAsyncContext()

      Specified by:
        `getAsyncContext` in interface `HttpRequest`

    - #### forward

          public void forward(String path)

      Specified by:
        `forward` in interface `HttpRequest`

    - #### wasForwarded

          public boolean wasForwarded()

      Specified by:
        `wasForwarded` in interface `HttpRequest`

Copyright © 2014. All Rights Reserved.