public abstract class AbstractAsynchronousResponse extends Object implements ResteasyAsynchronousResponse
| Modifier and Type | Field and Description |
|---|---|
protected Annotation[] |
annotations |
protected List<CompletionCallback> |
completionCallbacks |
protected SynchronousDispatcher |
dispatcher |
protected ResourceMethodInvoker |
method |
protected HttpRequest |
request |
protected HttpResponse |
response |
protected ContainerResponseFilter[] |
responseFilters |
protected TimeoutHandler |
timeoutHandler |
protected WriterInterceptor[] |
writerInterceptors |
NO_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAsynchronousResponse(SynchronousDispatcher dispatcher,
HttpRequest request,
HttpResponse response) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
completionCallbacks(Throwable throwable) |
Annotation[] |
getAnnotations() |
ResourceMethodInvoker |
getMethod() |
ContainerResponseFilter[] |
getResponseFilters() |
WriterInterceptor[] |
getWriterInterceptors() |
protected boolean |
internalResume(Object entity) |
protected boolean |
internalResume(Throwable exc) |
Collection<Class<?>> |
register(Class<?> callback)
Register an asynchronous processing lifecycle callback class to receive lifecycle
events for the asynchronous response based on the implemented callback interfaces.
|
Map<Class<?>,Collection<Class<?>>> |
register(Class<?> callback,
Class<?>... callbacks)
Register asynchronous processing lifecycle callback classes to receive lifecycle
events for the asynchronous response based on the implemented callback interfaces.
|
Collection<Class<?>> |
register(Object callback)
Register an asynchronous processing lifecycle callback instance to receive lifecycle
events for the asynchronous response based on the implemented callback interfaces.
|
Map<Class<?>,Collection<Class<?>>> |
register(Object callback,
Object... callbacks)
Register an asynchronous processing lifecycle callback instances to receive lifecycle
events for the asynchronous response based on the implemented callback interfaces.
|
void |
setAnnotations(Annotation[] annotations) |
void |
setMethod(ResourceMethodInvoker method) |
void |
setResponseFilters(ContainerResponseFilter[] responseFilters) |
void |
setTimeoutHandler(TimeoutHandler handler)
Set/replace a time-out handler for the suspended asynchronous response.
|
void |
setWriterInterceptors(WriterInterceptor[] writerInterceptors) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialRequestThreadFinishedcancel, cancel, cancel, isCancelled, isDone, isSuspended, resume, resume, setTimeoutprotected SynchronousDispatcher dispatcher
protected ResourceMethodInvoker method
protected HttpRequest request
protected HttpResponse response
protected ContainerResponseFilter[] responseFilters
protected WriterInterceptor[] writerInterceptors
protected Annotation[] annotations
protected TimeoutHandler timeoutHandler
protected List<CompletionCallback> completionCallbacks
protected AbstractAsynchronousResponse(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)
public Collection<Class<?>> register(Class<?> callback) throws NullPointerException
AsyncResponseregister in interface AsyncResponsecallback - callback class.NullPointerException - in case the callback class is null.public Collection<Class<?>> register(Object callback) throws NullPointerException
AsyncResponseregister in interface AsyncResponsecallback - callback instance implementing one or more of the recognized callback
interfaces.NullPointerException - in case the callback instance is null.public Map<Class<?>,Collection<Class<?>>> register(Class<?> callback, Class<?>... callbacks) throws NullPointerException
AsyncResponseregister in interface AsyncResponsecallback - callback class.callbacks - additional callback classes.NullPointerException - in case any of the callback classes is null.public Map<Class<?>,Collection<Class<?>>> register(Object callback, Object... callbacks) throws NullPointerException
AsyncResponseregister in interface AsyncResponsecallback - callback instance.callbacks - additional callback instances.NullPointerException - in case any of the callback instances is null.public void setTimeoutHandler(TimeoutHandler handler)
AsyncResponseThe time-out handler will be invoked when the suspend period of this asynchronous response times out. The job of the time-out handler is to resolve the time-out situation by either
Note that in case the response is suspended indefinitely,
the time-out handler may never be invoked.
setTimeoutHandler in interface AsyncResponsehandler - response time-out handler.public ResourceMethodInvoker getMethod()
getMethod in interface ResteasyAsynchronousResponsepublic void setMethod(ResourceMethodInvoker method)
setMethod in interface ResteasyAsynchronousResponsepublic ContainerResponseFilter[] getResponseFilters()
getResponseFilters in interface ResteasyAsynchronousResponsepublic void setResponseFilters(ContainerResponseFilter[] responseFilters)
setResponseFilters in interface ResteasyAsynchronousResponsepublic WriterInterceptor[] getWriterInterceptors()
getWriterInterceptors in interface ResteasyAsynchronousResponsepublic void setWriterInterceptors(WriterInterceptor[] writerInterceptors)
setWriterInterceptors in interface ResteasyAsynchronousResponsepublic Annotation[] getAnnotations()
getAnnotations in interface ResteasyAsynchronousResponsepublic void setAnnotations(Annotation[] annotations)
setAnnotations in interface ResteasyAsynchronousResponseprotected void completionCallbacks(Throwable throwable)
protected boolean internalResume(Object entity)
protected boolean internalResume(Throwable exc)
Copyright © 2013. All Rights Reserved.