Package: org.grails.web.servlet

## [Java] Class WrappedResponseHolder

- org.grails.web.servlet.WrappedResponseHolder

-     public class WrappedResponseHolder
      extends java.lang.Object

  A holder for the original Wrapped response for use when using includes.

  Authors:
    Graeme Rocher
  Since:
    0.5

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.ThreadLocal<javax.servlet.http.HttpServletResponse>` | `wrappedResponseHolder` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static javax.servlet.http.HttpServletResponse` | `getWrappedResponse()` Return the HttpServletResponse currently bound to the thread.
    `` | `public void` | `run()`
    `` | `public static void` | `setWrappedResponse(javax.servlet.http.HttpServletResponse response)` Bind the given HttpServletResponse to the current thread.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private static java.lang.ThreadLocal<javax.servlet.http.HttpServletResponse> wrappedResponseHolder

  - ### Method Detail

    - #### public static javax.servlet.http.HttpServletResponse getWrappedResponse()

      Return the HttpServletResponse currently bound to the thread.

      Returns:
        the HttpServletResponse currently bound to the thread, or `null`

    - #### public void run()

    - #### public static void setWrappedResponse(javax.servlet.http.HttpServletResponse response)

      Bind the given HttpServletResponse to the current thread.

      Parameters:
        `response` - the HttpServletResponse to expose