org.apache.axis2.client.async
Class Callback

java.lang.Object
  extended byorg.apache.axis2.client.async.Callback
Direct Known Subclasses:
InOutMEPClient.SyncCallBack

public abstract class Callback
extends Object

This Class is the abstract representation of a callback and is called at the completion of an asynchronous invocation.


Constructor Summary
Callback()
           
 
Method Summary
 boolean isComplete()
          Returns true if the asynchronous operation has completed, false otherwise.
abstract  void onComplete(AsyncResult result)
          This method is invoked by Axis Engine once the asynchronous operation has completed sucessfully.
abstract  void onError(Exception e)
          This method is called by Axis Engine if the asynchronous operation fails.
 void setComplete(boolean complete)
          Method setComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Callback

public Callback()
Method Detail

onComplete

public abstract void onComplete(AsyncResult result)
This method is invoked by Axis Engine once the asynchronous operation has completed sucessfully.

Parameters:
result -

onError

public abstract void onError(Exception e)
This method is called by Axis Engine if the asynchronous operation fails.

Parameters:
e -

isComplete

public boolean isComplete()
Returns true if the asynchronous operation has completed, false otherwise. Typically this is used for polling. e.g.
          while(!callback.isComplete()){
             Thread.sleep(1000);
          }
          do whatever u need to do
      

Returns:
boolean

setComplete

public void setComplete(boolean complete)
Method setComplete

Parameters:
complete -