org.apache.pivot.wtk
Class TaskAdapter<T>

java.lang.Object
  extended by org.apache.pivot.wtk.TaskAdapter<T>
All Implemented Interfaces:
TaskListener<T>

public class TaskAdapter<T>
extends Object
implements TaskListener<T>

Class that forwards task events to the UI thread.


Constructor Summary
TaskAdapter(TaskListener<T> taskListener)
          Creates a new TaskAdapter that wraps the specified task listener.
 
Method Summary
 void executeFailed(Task<T> task)
          Called when task execution has failed.
 void taskExecuted(Task<T> task)
          Called when the task has completed successfully.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskAdapter

public TaskAdapter(TaskListener<T> taskListener)
Creates a new TaskAdapter that wraps the specified task listener.

Parameters:
taskListener - The task listener that will be notified on the UI thread
Method Detail

taskExecuted

public void taskExecuted(Task<T> task)
Description copied from interface: TaskListener
Called when the task has completed successfully.

Specified by:
taskExecuted in interface TaskListener<T>
Parameters:
task - The source of the task event.

executeFailed

public void executeFailed(Task<T> task)
Description copied from interface: TaskListener
Called when task execution has failed.

Specified by:
executeFailed in interface TaskListener<T>
Parameters:
task - The source of the task event.