Package org.jboss.resteasy.core.interception.jaxrs

## Interface SuspendableContainerResponseContext

- All Superinterfaces:
    `javax.ws.rs.container.ContainerResponseContext`
  All Known Implementing Classes:
    `ContainerResponseContextImpl`

      public interface SuspendableContainerResponseContext
      extends javax.ws.rs.container.ContainerResponseContext

  Suspendable response context, which allows the users to suspend execution of the filter chain until it is resumed normally, or abnormally with a `Throwable`.
  Author:
    Stéphane Épardaud

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `resume()` | Resumes the current response, and proceeds to the next response filter, if any, or to send the response.
    `void` | `resume​(Throwable t)` | Aborts the current response with the given exception.
    `void` | `suspend()` | Suspends the current response.

    - ### Methods inherited from interface javax.ws.rs.container.ContainerResponseContext

      `getAllowedMethods, getCookies, getDate, getEntity, getEntityAnnotations, getEntityClass, getEntityStream, getEntityTag, getEntityType, getHeaders, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getStatus, getStatusInfo, getStringHeaders, hasEntity, hasLink, setEntity, setEntity, setEntityStream, setStatus, setStatusInfo`

- - ### Method Detail

    - #### suspend

          void suspend()

      Suspends the current response. This makes the current request asynchronous. No further response filter is executed until this response is resumed. No reply is going to be sent to the client until this response is resumed either with `resume()` or aborted with `resume(Throwable)` or `ResponseContainerRequestContext.abortWith(javax.ws.rs.core.Response)`.

    - #### resume

          void resume()

      Resumes the current response, and proceeds to the next response filter, if any, or to send the response.

    - #### resume

          void resume​(Throwable t)

      Aborts the current response with the given exception. This behaves as if the request filter threw this exception synchronously, which means that the exception will not be mapped by exception mappers, the response filters will stop running, and the async response callbacks will be called with this exception.
      Parameters:
        `t` - the exception to send back to the client, as an internal server error.