org.apache.cxf.jaxrs.impl
Class AsyncResponseImpl
java.lang.Object
org.apache.cxf.jaxrs.impl.AsyncResponseImpl
- All Implemented Interfaces:
- javax.ws.rs.container.AsyncResponse, ContinuationCallback
public class AsyncResponseImpl
- extends Object
- implements javax.ws.rs.container.AsyncResponse, ContinuationCallback
Fields inherited from interface javax.ws.rs.container.AsyncResponse |
NO_TIMEOUT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncResponseImpl
public AsyncResponseImpl(Message inMessage)
resume
public boolean resume(Object response)
- Specified by:
resume
in interface javax.ws.rs.container.AsyncResponse
resume
public boolean resume(Throwable response)
- Specified by:
resume
in interface javax.ws.rs.container.AsyncResponse
cancel
public boolean cancel()
- Specified by:
cancel
in interface javax.ws.rs.container.AsyncResponse
cancel
public boolean cancel(int retryAfter)
- Specified by:
cancel
in interface javax.ws.rs.container.AsyncResponse
cancel
public boolean cancel(Date retryAfter)
- Specified by:
cancel
in interface javax.ws.rs.container.AsyncResponse
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interface javax.ws.rs.container.AsyncResponse
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface javax.ws.rs.container.AsyncResponse
isDone
public boolean isDone()
- Specified by:
isDone
in interface javax.ws.rs.container.AsyncResponse
setTimeout
public boolean setTimeout(long time,
TimeUnit unit)
throws IllegalStateException
- Specified by:
setTimeout
in interface javax.ws.rs.container.AsyncResponse
- Throws:
IllegalStateException
setTimeoutHandler
public void setTimeoutHandler(javax.ws.rs.container.TimeoutHandler handler)
- Specified by:
setTimeoutHandler
in interface javax.ws.rs.container.AsyncResponse
register
public Collection<Class<?>> register(Class<?> 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 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(Object callback,
Object... callbacks)
throws NullPointerException
- Specified by:
register
in interface javax.ws.rs.container.AsyncResponse
- Throws:
NullPointerException
onComplete
public void onComplete()
- Description copied from interface:
ContinuationCallback
- This method is called when the container completes writing the response to the client
- Specified by:
onComplete
in interface ContinuationCallback
onError
public void onError(Throwable error)
- Description copied from interface:
ContinuationCallback
- This method is called when the exception gets propagated to the container
- Specified by:
onError
in interface ContinuationCallback
- Parameters:
error
- the propagated exception instance
onDisconnect
public void onDisconnect()
- Description copied from interface:
ContinuationCallback
- This method may be called if the container detects that the client has disconnected
- Specified by:
onDisconnect
in interface ContinuationCallback
suspendContinuationIfNeeded
public boolean suspendContinuationIfNeeded()
getResponseObject
public Object getResponseObject()
isResumedByApplication
public boolean isResumedByApplication()
handleTimeout
public void handleTimeout()
prepareContinuation
public void prepareContinuation()
setUnmappedThrowable
public void setUnmappedThrowable(Throwable t)
reset
public void reset()
Apache CXF