org.apache.axis2.jaxws.client.async
Class AsyncResponse

java.lang.Object
  extended by org.apache.axis2.jaxws.client.async.AsyncResponse
All Implemented Interfaces:
Future, Response
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. The Response 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
protected AsyncResponse(EndpointDescription ed)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 occurred
faultCtx - 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)
Specified by:
cancel in interface Future

get

public Object get()
           throws InterruptedException,
                  ExecutionException
Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException

get

public Object get(long timeout,
                  TimeUnit unit)
           throws InterruptedException,
                  ExecutionException,
                  TimeoutException
Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException
TimeoutException

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future

isDone

public boolean isDone()
Specified by:
isDone in interface Future

getContext

public Map getContext()
Specified by:
getContext in interface Response

getResponseValueObject

public abstract Object getResponseValueObject(MessageContext mc)

getFaultResponse

public abstract Throwable getFaultResponse(MessageContext mc)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.