public class AsyncResponseImpl extends Object implements javax.ws.rs.container.AsyncResponse, ContinuationCallback
| Constructor and Description |
|---|
AsyncResponseImpl(Message inMessage) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel() |
boolean |
cancel(Date retryAfter) |
boolean |
cancel(int retryAfter) |
Object |
getResponseObject() |
void |
handleTimeout() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isResumedByApplication() |
boolean |
isSuspended() |
void |
onComplete()
This method is called when the container completes writing the response to the client
|
void |
onDisconnect()
This method may be called if the container detects that the client has disconnected
|
void |
onError(Throwable error)
This method is called when the exception gets propagated to the container
|
void |
prepareContinuation() |
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 |
reset() |
boolean |
resume(Object response) |
boolean |
resume(Throwable response) |
boolean |
setTimeout(long time,
TimeUnit unit) |
void |
setTimeoutHandler(javax.ws.rs.container.TimeoutHandler handler) |
void |
setUnmappedThrowable(Throwable t) |
boolean |
suspendContinuationIfNeeded() |
public AsyncResponseImpl(Message inMessage)
public boolean resume(Object response)
resume in interface javax.ws.rs.container.AsyncResponsepublic boolean resume(Throwable response)
resume in interface javax.ws.rs.container.AsyncResponsepublic boolean cancel()
cancel in interface javax.ws.rs.container.AsyncResponsepublic boolean cancel(int retryAfter)
cancel in interface javax.ws.rs.container.AsyncResponsepublic boolean cancel(Date retryAfter)
cancel in interface javax.ws.rs.container.AsyncResponsepublic boolean isSuspended()
isSuspended in interface javax.ws.rs.container.AsyncResponsepublic boolean isCancelled()
isCancelled in interface javax.ws.rs.container.AsyncResponsepublic boolean isDone()
isDone in interface javax.ws.rs.container.AsyncResponsepublic boolean setTimeout(long time,
TimeUnit unit)
throws IllegalStateException
setTimeout in interface javax.ws.rs.container.AsyncResponseIllegalStateExceptionpublic void setTimeoutHandler(javax.ws.rs.container.TimeoutHandler handler)
setTimeoutHandler in interface javax.ws.rs.container.AsyncResponsepublic Collection<Class<?>> register(Class<?> callback) throws NullPointerException
register in interface javax.ws.rs.container.AsyncResponseNullPointerExceptionpublic Map<Class<?>,Collection<Class<?>>> register(Class<?> callback, Class<?>... callbacks) throws NullPointerException
register in interface javax.ws.rs.container.AsyncResponseNullPointerExceptionpublic Collection<Class<?>> register(Object callback) throws NullPointerException
register in interface javax.ws.rs.container.AsyncResponseNullPointerExceptionpublic Map<Class<?>,Collection<Class<?>>> register(Object callback, Object... callbacks) throws NullPointerException
register in interface javax.ws.rs.container.AsyncResponseNullPointerExceptionpublic void onComplete()
ContinuationCallbackonComplete in interface ContinuationCallbackpublic void onError(Throwable error)
ContinuationCallbackonError in interface ContinuationCallbackerror - the propagated exception instancepublic void onDisconnect()
ContinuationCallbackonDisconnect in interface ContinuationCallbackpublic boolean suspendContinuationIfNeeded()
public Object getResponseObject()
public boolean isResumedByApplication()
public void handleTimeout()
public void prepareContinuation()
public void setUnmappedThrowable(Throwable t)
public void reset()
Apache CXF