For example, the following code calls
java.com.sgi.sysadm.ui.Task.runPriv, and causes the task to succeed
or fail based on asynchronous notification about whether or not the
runPriv operation succeeded.
stream = runPriv(privcmdName, taskData, new ResultListener() {
public void succeeded(ResultEvent event) {
_taskContext.notBusy();
taskSucceeded(event);
}
public void failed(ResultEvent event) {
_taskContext.notBusy();
taskFailed(event);
}
});
-
failed(ResultEvent)
- Called when an asynchronous operation fails.
-
succeeded(ResultEvent)
- Called when an asynchronous operation succeeds.
succeeded
public abstract void succeeded(ResultEvent event)
- Called when an asynchronous operation succeeds.
The result of the operation is typically accessible via
event.getResult.
- Parameters:
- event - ResultEvent optionally containing result Object.
failed
public abstract void failed(ResultEvent event)
- Called when an asynchronous operation fails.
The reason for the failure is typically accessible via
event.getReason.
- Parameters:
- event - ResultEvent optionally containing reason for
failure.
All Packages Class Hierarchy This Package Previous Next Index