| java.lang.Object org.apache.axis2.client.async.Callback
Callback | abstract public class Callback (Code) | | 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
Callback.setComplete(boolean) , and either
Callback.onComplete(AsyncResult) or
Callback.onError(Exception) when the operation is completed.
|
Method Summary | |
public synchronized boolean | isComplete() Returns true if the asynchronous operation has completed, false otherwise. | abstract public void | onComplete(AsyncResult result) Method is invoked by Axis2 once the asynchronous operation has completed
successfully. | abstract public void | onError(Exception e) Method invoked by Axis2 if the asynchronous operation fails. | final public synchronized void | setComplete(boolean complete) Method invoked by Axis2 to set the completion state of the operation. |
isComplete | public synchronized boolean isComplete()(Code) | | 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
boolean |
onComplete | abstract public void onComplete(AsyncResult result)(Code) | | Method is invoked by Axis2 once the asynchronous operation has completed
successfully.
Parameters: result - |
onError | abstract public void onError(Exception e)(Code) | | Method invoked by Axis2 if the asynchronous operation fails.
Parameters: e - |
setComplete | final public synchronized void setComplete(boolean complete)(Code) | | Method invoked by Axis2 to set the completion state of the operation.
Parameters: complete - |
|
|