org.apache.axis2.client.async
Class Callback

java.lang.Object
  extended by org.apache.axis2.client.async.Callback
Direct Known Subclasses:
CallbackFuture, PollingFuture

Deprecated. Please use AxisCallback instead, this class is deprecated as of 1.3

public abstract class Callback
extends java.lang.Object

Base class for asynchronous client callback handler. The application code needs to create an instance of this class (actually an instance of a subclass, since this base class cannot be used directly) and pass it to the generated startXXX client stub method when initiating an asynchronous operation. The Axis2 code then calls the appropriate methods of this class setComplete(boolean), and either onComplete(AsyncResult) or onError(Exception) when the operation is completed.


Constructor Summary
Callback()
          Deprecated.  
 
Method Summary
 boolean isComplete()
          Deprecated. Returns true if the asynchronous operation has completed, false otherwise.
abstract  void onComplete(AsyncResult result)
          Deprecated. Method is invoked by Axis2 once the asynchronous operation has completed successfully.
abstract  void onError(java.lang.Exception e)
          Deprecated. Method invoked by Axis2 if the asynchronous operation fails.
 void setComplete(boolean complete)
          Deprecated. Method invoked by Axis2 to set the completion state of the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Callback

public Callback()
Deprecated. 
Method Detail

onComplete

public abstract void onComplete(AsyncResult result)
Deprecated. 
Method is invoked by Axis2 once the asynchronous operation has completed successfully.

Parameters:
result -

onError

public abstract void onError(java.lang.Exception e)
Deprecated. 
Method invoked by Axis2 if the asynchronous operation fails.

Parameters:
e -

isComplete

public boolean isComplete()
Deprecated. 
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 final void setComplete(boolean complete)
Deprecated. 
Method invoked by Axis2 to set the completion state of the operation.

Parameters:
complete -


Copyright © 2007 Apache Web Services Project. All Rights Reserved.