org.jboss.resteasy.plugins.server.servlet

## Class HttpServletResponseWrapper

- java.lang.Object
- - org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper

- All Implemented Interfaces:
    HttpResponse

      public class HttpServletResponseWrapper
      extends Object
      implements HttpResponse

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `HttpServletResponseWrapper.DeferredOutputStream` RESTEASY-684 wants to defer access to outputstream until a write/flush/close happens

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ResteasyProviderFactory` | `factory`
    `protected MultivaluedMap<String,Object>` | `outputHeaders`
    `protected OutputStream` | `outputStream`
    `protected javax.servlet.http.HttpServletResponse` | `response`
    `protected int` | `status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response, ResteasyProviderFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNewCookie(NewCookie cookie)`
    `MultivaluedMap<String,Object>` | `getOutputHeaders()`
    `OutputStream` | `getOutputStream()`
    `int` | `getStatus()`
    `boolean` | `isCommitted()`
    `void` | `reset()` reset status and headers.
    `void` | `sendError(int status)`
    `void` | `sendError(int status, String message)`
    `void` | `setOutputStream(OutputStream os)`
    `void` | `setStatus(int status)`

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

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

- - ### Field Detail

    - #### response

          protected javax.servlet.http.HttpServletResponse response

    - #### status

          protected int status

    - #### outputHeaders

          protected MultivaluedMap<String,Object> outputHeaders

    - #### factory

          protected ResteasyProviderFactory factory

    - #### outputStream

          protected OutputStream outputStream

  - ### Constructor Detail

    - #### HttpServletResponseWrapper

          public HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response,
                                    ResteasyProviderFactory factory)

  - ### Method Detail

    - #### getStatus

          public int getStatus()

      Specified by:
        `getStatus` in interface `HttpResponse`

    - #### setStatus

          public void setStatus(int status)

      Specified by:
        `setStatus` in interface `HttpResponse`

    - #### getOutputHeaders

          public MultivaluedMap<String,Object> getOutputHeaders()

      Specified by:
        `getOutputHeaders` in interface `HttpResponse`

    - #### getOutputStream

          public OutputStream getOutputStream()
                                       throws IOException

      Specified by:
        `getOutputStream` in interface `HttpResponse`
      Throws:
        `IOException`

    - #### setOutputStream

          public void setOutputStream(OutputStream os)

      Specified by:
        `setOutputStream` in interface `HttpResponse`

    - #### addNewCookie

          public void addNewCookie(NewCookie cookie)

      Specified by:
        `addNewCookie` in interface `HttpResponse`

    - #### sendError

          public void sendError(int status)
                         throws IOException

      Specified by:
        `sendError` in interface `HttpResponse`
      Throws:
        `IOException`

    - #### sendError

          public void sendError(int status,
                       String message)
                         throws IOException

      Specified by:
        `sendError` in interface `HttpResponse`
      Throws:
        `IOException`

    - #### isCommitted

          public boolean isCommitted()

      Specified by:
        `isCommitted` in interface `HttpResponse`

    - #### reset

          public void reset()

      Description copied from interface: `HttpResponse`
      reset status and headers. Will fail if response is committed
      Specified by:
        `reset` in interface `HttpResponse`

Copyright © 2014. All Rights Reserved.