com.samskivert.swing.util
Interface TaskObserver


public interface TaskObserver

The task observer interface provides the means by which the task master can communicate the success or failure of a task invocation back to the originator of a task.


Method Summary
 void taskCompleted(String name, Object result)
          If the task successfully runs to completion and returns a result, this member function will be called on the supplied observer.
 void taskFailed(String name, Throwable exception)
          If the task fails to run to completion and instead throws an exception, this member function will be called on the supplied observer.
 

Method Detail

taskCompleted

void taskCompleted(String name,
                   Object result)
If the task successfully runs to completion and returns a result, this member function will be called on the supplied observer.

Parameters:
name - The name under which the task was originally invoked.
result - The result returned by the task's invoke() method.

taskFailed

void taskFailed(String name,
                Throwable exception)
If the task fails to run to completion and instead throws an exception, this member function will be called on the supplied observer.

Parameters:
name - The name under which the task was originally invoked.
exception - The exception thrown by the task during the call to invoke().


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.