org.jboss.resteasy.plugins.server.netty

## Class NettyHttpRequest

- java.lang.Object
- - org.jboss.resteasy.plugins.server.BaseHttpRequest
  - - org.jboss.resteasy.plugins.server.netty.NettyHttpRequest

- All Implemented Interfaces:
    HttpRequest

      public class NettyHttpRequest
      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, Norman Maurer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,Object>` | `attributes`
    `protected SynchronousDispatcher` | `dispatcher`
    `protected ResteasyHttpHeaders` | `httpHeaders`
    `protected String` | `httpMethod`
    `protected NettyHttpResponse` | `httpResponse`
    `protected InputStream` | `inputStream`

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

      `decodedFormParameters, formParameters, uri`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NettyHttpRequest(ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, String httpMethod, SynchronousDispatcher dispatcher, NettyHttpResponse httpResponse, boolean is100ContinueExpected)`

  - ### 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()`
    `HttpHeaders` | `getHttpHeaders()`
    `String` | `getHttpMethod()`
    `InputStream` | `getInputStream()`
    `MultivaluedMap<String,String>` | `getMutableHeaders()`
    `NettyHttpResponse` | `getResponse()`
    `boolean` | `is100ContinueExpected()`
    `boolean` | `isKeepAlive()`
    `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

      `getDecodedFormParameters, getFormParameters, 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

    - #### dispatcher

          protected SynchronousDispatcher dispatcher

    - #### httpMethod

          protected String httpMethod

    - #### inputStream

          protected InputStream inputStream

    - #### attributes

          protected Map<String,Object> attributes

    - #### httpResponse

          protected NettyHttpResponse httpResponse

  - ### Constructor Detail

    - #### NettyHttpRequest

          public NettyHttpRequest(ResteasyHttpHeaders httpHeaders,
                          ResteasyUriInfo uri,
                          String httpMethod,
                          SynchronousDispatcher dispatcher,
                          NettyHttpResponse httpResponse,
                          boolean is100ContinueExpected)

  - ### Method Detail

    - #### getMutableHeaders

          public MultivaluedMap<String,String> getMutableHeaders()

    - #### setHttpMethod

          public void setHttpMethod(String method)

    - #### getAttributeNames

          public Enumeration<String> getAttributeNames()

    - #### getAsyncContext

          public ResteasyAsynchronousContext getAsyncContext()

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

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

    - #### getResponse

          public NettyHttpResponse getResponse()

    - #### isKeepAlive

          public boolean isKeepAlive()

    - #### is100ContinueExpected

          public boolean is100ContinueExpected()

    - #### forward

          public void forward(String path)

    - #### wasForwarded

          public boolean wasForwarded()

Copyright © 2014. All Rights Reserved.