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.AsyncResponse
public boolean resume(Throwable response)
resume
in interface javax.ws.rs.container.AsyncResponse
public boolean cancel()
cancel
in interface javax.ws.rs.container.AsyncResponse
public boolean cancel(int retryAfter)
cancel
in interface javax.ws.rs.container.AsyncResponse
public boolean cancel(Date retryAfter)
cancel
in interface javax.ws.rs.container.AsyncResponse
public boolean isSuspended()
isSuspended
in interface javax.ws.rs.container.AsyncResponse
public boolean isCancelled()
isCancelled
in interface javax.ws.rs.container.AsyncResponse
public boolean isDone()
isDone
in interface javax.ws.rs.container.AsyncResponse
public boolean setTimeout(long time, TimeUnit unit) throws IllegalStateException
setTimeout
in interface javax.ws.rs.container.AsyncResponse
IllegalStateException
public void setTimeoutHandler(javax.ws.rs.container.TimeoutHandler handler)
setTimeoutHandler
in interface javax.ws.rs.container.AsyncResponse
public Collection<Class<?>> register(Class<?> callback) throws NullPointerException
register
in interface javax.ws.rs.container.AsyncResponse
NullPointerException
public Map<Class<?>,Collection<Class<?>>> register(Class<?> callback, Class<?>... callbacks) throws NullPointerException
register
in interface javax.ws.rs.container.AsyncResponse
NullPointerException
public Collection<Class<?>> register(Object callback) throws NullPointerException
register
in interface javax.ws.rs.container.AsyncResponse
NullPointerException
public Map<Class<?>,Collection<Class<?>>> register(Object callback, Object... callbacks) throws NullPointerException
register
in interface javax.ws.rs.container.AsyncResponse
NullPointerException
public void onComplete()
ContinuationCallback
onComplete
in interface ContinuationCallback
public void onError(Throwable error)
ContinuationCallback
onError
in interface ContinuationCallback
error
- the propagated exception instancepublic void onDisconnect()
ContinuationCallback
onDisconnect
in interface ContinuationCallback
public boolean suspendContinuationIfNeeded()
public Object getResponseObject()
public boolean isResumedByApplication()
public void handleTimeout()
public void prepareContinuation()
public void setUnmappedThrowable(Throwable t)
public void reset()
Apache CXF