org.jboss.resteasy.plugins.server.servlet

## Class HttpServletInputMessage

- java.lang.Object
- - org.jboss.resteasy.plugins.server.BaseHttpRequest
  - - org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage

- All Implemented Interfaces:
    HttpRequest
  Direct Known Subclasses:
    Servlet3AsyncHttpRequest

      public class HttpServletInputMessage
      extends BaseHttpRequest

  Abstraction for an inbound http request on the server, or a response from a server to a client

  We have this abstraction so that we can reuse marshalling objects in a client framework and serverside framework
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SynchronousDispatcher` | `dispatcher`
    `protected SynchronousExecutionContext` | `executionContext`
    `protected ResteasyHttpHeaders` | `httpHeaders`
    `protected String` | `httpMethod`
    `protected HttpResponse` | `httpResponse`
    `protected InputStream` | `overridenStream`
    `protected javax.servlet.http.HttpServletRequest` | `request`
    `protected javax.servlet.ServletContext` | `servletContext`
    `protected javax.servlet.http.HttpServletResponse` | `servletResponse`
    `protected boolean` | `wasForwarded`

    - ### Fields inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest

      `decodedFormParameters, formParameters, uri`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpServletInputMessage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse servletResponse, javax.servlet.ServletContext servletContext, HttpResponse httpResponse, ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, String httpMethod, SynchronousDispatcher dispatcher)`

  - ### 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()`
    `MultivaluedMap<String,String>` | `getPutDecodedFormParameters()`
    `MultivaluedMap<String,String>` | `getPutFormParameters()`
    `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().
    `boolean` | `wasForwarded()`

    - ### Methods inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest

      `getUri, isInitial, setRequestUri, setRequestUri`

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

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

- - ### Field Detail

    - #### httpHeaders

          protected ResteasyHttpHeaders httpHeaders

    - #### request

          protected javax.servlet.http.HttpServletRequest request

    - #### servletResponse

          protected javax.servlet.http.HttpServletResponse servletResponse

    - #### servletContext

          protected javax.servlet.ServletContext servletContext

    - #### dispatcher

          protected SynchronousDispatcher dispatcher

    - #### httpResponse

          protected HttpResponse httpResponse

    - #### httpMethod

          protected String httpMethod

    - #### overridenStream

          protected InputStream overridenStream

    - #### executionContext

          protected SynchronousExecutionContext executionContext

    - #### wasForwarded

          protected boolean wasForwarded

  - ### Constructor Detail

    - #### HttpServletInputMessage

          public HttpServletInputMessage(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse servletResponse,
                                 javax.servlet.ServletContext servletContext,
                                 HttpResponse httpResponse,
                                 ResteasyHttpHeaders httpHeaders,
                                 ResteasyUriInfo uri,
                                 String httpMethod,
                                 SynchronousDispatcher dispatcher)

  - ### Method Detail

    - #### getMutableHeaders

          public MultivaluedMap<String,String> getMutableHeaders()

    - #### getPutFormParameters

          public MultivaluedMap<String,String> getPutFormParameters()

    - #### getPutDecodedFormParameters

          public MultivaluedMap<String,String> getPutDecodedFormParameters()

    - #### getAttribute

          public Object getAttribute(String attribute)

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

    - #### setAttribute

          public void setAttribute(String name,
                          Object value)

    - #### removeAttribute

          public void removeAttribute(String name)

    - #### getAttributeNames

          public Enumeration<String> getAttributeNames()

    - #### 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`
      Overrides:
        `getFormParameters` in class `BaseHttpRequest`
      Returns:
        null if no parameters, this is encoded map

    - #### getDecodedFormParameters

          public MultivaluedMap<String,String> getDecodedFormParameters()

      Specified by:
        `getDecodedFormParameters` in interface `HttpRequest`
      Overrides:
        `getDecodedFormParameters` in class `BaseHttpRequest`

    - #### getHttpHeaders

          public HttpHeaders getHttpHeaders()

    - #### getInputStream

          public InputStream getInputStream()

    - #### 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

    - #### getHttpMethod

          public String getHttpMethod()

    - #### setHttpMethod

          public void setHttpMethod(String method)

    - #### getAsyncContext

          public ResteasyAsynchronousContext getAsyncContext()

    - #### forward

          public void forward(String path)

    - #### wasForwarded

          public boolean wasForwarded()

Copyright © 2014. All Rights Reserved.