Apache CXF API

org.apache.cxf.jaxrs.impl
Class AsyncResponseImpl

java.lang.Object
  extended by 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


Field Summary
 
Fields inherited from interface javax.ws.rs.container.AsyncResponse
NO_TIMEOUT
 
Constructor Summary
AsyncResponseImpl(Message inMessage)
           
 
Method Summary
 void cancel()
           
 void cancel(Date retryAfter)
           
 void cancel(int retryAfter)
           
 Object getResponseObject()
           
 boolean handleTimeout()
           
 boolean isCancelled()
           
 boolean isDone()
           
 boolean isResumedByApplication()
           
 boolean isSuspended()
           
 void onComplete()
           
 void onError(Throwable error)
           
 boolean register(Class<?> callback)
           
 boolean[] register(Class<?> callback, Class<?>... callbacks)
           
 boolean register(Object callback)
           
 boolean[] register(Object callback, Object... callbacks)
           
 void resume(Object response)
           
 void resume(Throwable response)
           
 void setTimeout(long time, TimeUnit unit)
           
 void setTimeoutHandler(javax.ws.rs.container.TimeoutHandler handler)
           
 void suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncResponseImpl

public AsyncResponseImpl(Message inMessage)
Method Detail

resume

public void resume(Object response)
            throws IllegalStateException
Specified by:
resume in interface javax.ws.rs.container.AsyncResponse
Throws:
IllegalStateException

resume

public void resume(Throwable response)
            throws IllegalStateException
Specified by:
resume in interface javax.ws.rs.container.AsyncResponse
Throws:
IllegalStateException

cancel

public void cancel()
Specified by:
cancel in interface javax.ws.rs.container.AsyncResponse

cancel

public void cancel(int retryAfter)
Specified by:
cancel in interface javax.ws.rs.container.AsyncResponse

cancel

public void 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 void 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 boolean register(Class<?> callback)
                 throws NullPointerException
Specified by:
register in interface javax.ws.rs.container.AsyncResponse
Throws:
NullPointerException

register

public boolean[] register(Class<?> callback,
                          Class<?>... callbacks)
                   throws NullPointerException
Specified by:
register in interface javax.ws.rs.container.AsyncResponse
Throws:
NullPointerException

register

public boolean register(Object callback)
                 throws NullPointerException
Specified by:
register in interface javax.ws.rs.container.AsyncResponse
Throws:
NullPointerException

register

public boolean[] register(Object callback,
                          Object... callbacks)
                   throws NullPointerException
Specified by:
register in interface javax.ws.rs.container.AsyncResponse
Throws:
NullPointerException

suspend

public void suspend()

getResponseObject

public Object getResponseObject()

isResumedByApplication

public boolean isResumedByApplication()

handleTimeout

public boolean handleTimeout()

onComplete

public void onComplete()
Specified by:
onComplete in interface ContinuationCallback

onError

public void onError(Throwable error)
Specified by:
onError in interface ContinuationCallback

Apache CXF API

Apache CXF