Class AsyncResponse
- java.lang.Object
-
- org.apache.axis2.jaxws.client.async.AsyncResponse
-
- Direct Known Subclasses:
JAXBDispatchAsyncListener
,ProxyAsyncListener
,XMLDispatchAsyncListener
public abstract class AsyncResponse extends Object implements Response
The AsyncResponse class is used to collect the response information from Axis2 and deliver it to a JAX-WS client. AsyncResponse implements the javax.xml.ws.Response API that is defined in the JAX-WS 2.0 specification. TheResponse
object will contain both the object that is returned as the response along with a java.util.Map with the context information of the response.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AsyncResponse(EndpointDescription ed)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
Object
get()
Object
get(long timeout, TimeUnit unit)
Map
getContext()
abstract Throwable
getFaultResponse(MessageContext mc)
abstract Object
getResponseValueObject(MessageContext mc)
boolean
isCancelled()
boolean
isDone()
protected void
onComplete(MessageContext mc)
protected void
onComplete(MessageContext mc, ClassLoader cl)
protected void
onError(Throwable flt, MessageContext faultCtx)
protected void
onError(Throwable flt, MessageContext mc, ClassLoader cl)
-
-
-
Constructor Detail
-
AsyncResponse
protected AsyncResponse(EndpointDescription ed)
-
-
Method Detail
-
onError
protected void onError(Throwable flt, MessageContext mc, ClassLoader cl)
-
onError
protected void onError(Throwable flt, MessageContext faultCtx)
- Parameters:
flt
- Throwable fault that occurredfaultCtx
- MessageContext if fault is a SOAP Fault
-
onComplete
protected void onComplete(MessageContext mc, ClassLoader cl)
-
onComplete
protected void onComplete(MessageContext mc)
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
get
public Object get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture
- Throws:
InterruptedException
ExecutionException
-
get
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture
-
getContext
public Map getContext()
- Specified by:
getContext
in interfaceResponse
-
getResponseValueObject
public abstract Object getResponseValueObject(MessageContext mc)
-
getFaultResponse
public abstract Throwable getFaultResponse(MessageContext mc)
-
-