Package org.jboss.resteasy.core

## Class AbstractAsynchronousResponse

- java.lang.Object
- - org.jboss.resteasy.core.AbstractAsynchronousResponse

- All Implemented Interfaces:
    `javax.ws.rs.container.AsyncResponse`, `ResourceMethodInvokerAwareResponse`, `ResteasyAsynchronousResponse`
  Direct Known Subclasses:
    `SynchronousExecutionContext.SynchronousAsynchronousResponse`

      public abstract class AbstractAsynchronousResponse
      extends Object
      implements ResteasyAsynchronousResponse, ResourceMethodInvokerAwareResponse

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected Annotation[]` | `annotations` |
    `protected AsyncWriterInterceptor[]` | `asyncWriterInterceptors` |
    `protected List<javax.ws.rs.container.CompletionCallback>` | `completionCallbacks` |
    `protected Map<Class<?>,​Object>` | `contextDataMap` |
    `protected SynchronousDispatcher` | `dispatcher` |
    `protected ResourceMethodInvoker` | `method` |
    `protected HttpRequest` | `request` |
    `protected HttpResponse` | `response` |
    `protected javax.ws.rs.container.ContainerResponseFilter[]` | `responseFilters` |
    `protected javax.ws.rs.container.TimeoutHandler` | `timeoutHandler` |
    `protected javax.ws.rs.ext.WriterInterceptor[]` | `writerInterceptors` |

    - ### Fields inherited from interface javax.ws.rs.container.AsyncResponse

      `NO_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `AbstractAsynchronousResponse​(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `completionCallbacks​(Throwable throwable)` |
    `Annotation[]` | `getAnnotations()` |
    `AsyncWriterInterceptor[]` | `getAsyncWriterInterceptors()` |
    `ResourceMethodInvoker` | `getMethod()` |
    `javax.ws.rs.container.ContainerResponseFilter[]` | `getResponseFilters()` |
    `javax.ws.rs.ext.WriterInterceptor[]` | `getWriterInterceptors()` |
    `protected boolean` | `internalResume​(Object entity)` | Deprecated.
    `protected boolean` | `internalResume​(Object entity, Consumer<Throwable> onComplete)` |
    `protected boolean` | `internalResume​(Throwable exc)` | Deprecated.
    `protected boolean` | `internalResume​(Throwable exc, Consumer<Throwable> onComplete)` |
    `Collection<Class<?>>` | `register​(Class<?> callback)` |
    `Map<Class<?>,​Collection<Class<?>>>` | `register​(Class<?> callback, Class<?>... callbacks)` |
    `Collection<Class<?>>` | `register​(Object callback)` |
    `Map<Class<?>,​Collection<Class<?>>>` | `register​(Object callback, Object... callbacks)` |
    `void` | `setAnnotations​(Annotation[] annotations)` |
    `void` | `setMethod​(ResourceMethodInvoker method)` |
    `void` | `setResponseFilters​(javax.ws.rs.container.ContainerResponseFilter[] responseFilters)` |
    `void` | `setTimeoutHandler​(javax.ws.rs.container.TimeoutHandler handler)` |
    `void` | `setWriterInterceptors​(javax.ws.rs.ext.WriterInterceptor[] writerInterceptors)` |

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

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

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

      `cancel, cancel, cancel, isCancelled, isDone, isSuspended, resume, resume, setTimeout`

    - ### Methods inherited from interface org.jboss.resteasy.spi.ResteasyAsynchronousResponse

      `complete, initialRequestThreadFinished`

- - ### Field Detail

    - #### dispatcher

          protected SynchronousDispatcher dispatcher

    - #### method

          protected ResourceMethodInvoker method

    - #### request

          protected HttpRequest request

    - #### response

          protected HttpResponse response

    - #### responseFilters

          protected javax.ws.rs.container.ContainerResponseFilter[] responseFilters

    - #### writerInterceptors

          protected javax.ws.rs.ext.WriterInterceptor[] writerInterceptors

    - #### asyncWriterInterceptors

          protected AsyncWriterInterceptor[] asyncWriterInterceptors

    - #### annotations

          protected Annotation[] annotations

    - #### timeoutHandler

          protected javax.ws.rs.container.TimeoutHandler timeoutHandler

    - #### completionCallbacks

          protected List<javax.ws.rs.container.CompletionCallback> completionCallbacks

    - #### contextDataMap

          protected Map<Class<?>,​Object> contextDataMap

  - ### Constructor Detail

    - #### AbstractAsynchronousResponse

          protected AbstractAsynchronousResponse​(SynchronousDispatcher dispatcher,
                                                 HttpRequest request,
                                                 HttpResponse response)

  - ### Method Detail

    - #### register

          public Collection<Class<?>> register​(Class<?> callback)
                                        throws NullPointerException

      Specified by:
        `register` in interface `javax.ws.rs.container.AsyncResponse`
      Throws:
        `NullPointerException`

    - #### register

          public Collection<Class<?>> register​(Object callback)
                                        throws NullPointerException

      Specified by:
        `register` in interface `javax.ws.rs.container.AsyncResponse`
      Throws:
        `NullPointerException`

    - #### register

          public Map<Class<?>,​Collection<Class<?>>> register​(Class<?> callback,
                                                                   Class<?>... callbacks)
                                                            throws NullPointerException

      Specified by:
        `register` in interface `javax.ws.rs.container.AsyncResponse`
      Throws:
        `NullPointerException`

    - #### register

          public Map<Class<?>,​Collection<Class<?>>> register​(Object callback,
                                                                   Object... callbacks)
                                                            throws NullPointerException

      Specified by:
        `register` in interface `javax.ws.rs.container.AsyncResponse`
      Throws:
        `NullPointerException`

    - #### setTimeoutHandler

          public void setTimeoutHandler​(javax.ws.rs.container.TimeoutHandler handler)

      Specified by:
        `setTimeoutHandler` in interface `javax.ws.rs.container.AsyncResponse`

    - #### getMethod

          public ResourceMethodInvoker getMethod()

      Specified by:
        `getMethod` in interface `ResourceMethodInvokerAwareResponse`

    - #### setMethod

          public void setMethod​(ResourceMethodInvoker method)

      Specified by:
        `setMethod` in interface `ResourceMethodInvokerAwareResponse`

    - #### getResponseFilters

          public javax.ws.rs.container.ContainerResponseFilter[] getResponseFilters()

      Specified by:
        `getResponseFilters` in interface `ResteasyAsynchronousResponse`

    - #### setResponseFilters

          public void setResponseFilters​(javax.ws.rs.container.ContainerResponseFilter[] responseFilters)

      Specified by:
        `setResponseFilters` in interface `ResteasyAsynchronousResponse`

    - #### getWriterInterceptors

          public javax.ws.rs.ext.WriterInterceptor[] getWriterInterceptors()

      Specified by:
        `getWriterInterceptors` in interface `ResteasyAsynchronousResponse`

    - #### setWriterInterceptors

          public void setWriterInterceptors​(javax.ws.rs.ext.WriterInterceptor[] writerInterceptors)

      Specified by:
        `setWriterInterceptors` in interface `ResteasyAsynchronousResponse`

    - #### getAsyncWriterInterceptors

          public AsyncWriterInterceptor[] getAsyncWriterInterceptors()

      Specified by:
        `getAsyncWriterInterceptors` in interface `ResteasyAsynchronousResponse`

    - #### getAnnotations

          public Annotation[] getAnnotations()

      Specified by:
        `getAnnotations` in interface `ResteasyAsynchronousResponse`

    - #### setAnnotations

          public void setAnnotations​(Annotation[] annotations)

      Specified by:
        `setAnnotations` in interface `ResteasyAsynchronousResponse`

    - #### completionCallbacks

          public void completionCallbacks​(Throwable throwable)

      Specified by:
        `completionCallbacks` in interface `ResteasyAsynchronousResponse`

    - #### internalResume

          @Deprecated
          protected boolean internalResume​(Object entity)

      Deprecated.

    - #### internalResume

          protected boolean internalResume​(Object entity,
                                           Consumer<Throwable> onComplete)

    - #### internalResume

          @Deprecated
          protected boolean internalResume​(Throwable exc)

      Deprecated.

    - #### internalResume

          protected boolean internalResume​(Throwable exc,
                                           Consumer<Throwable> onComplete)