Package org.apache.pivot.wtk
Class TaskAdapter<T>
- java.lang.Object
-
- org.apache.pivot.wtk.TaskAdapter<T>
-
- All Implemented Interfaces:
TaskListener<T>
public class TaskAdapter<T> extends java.lang.Object implements TaskListener<T>
Class that forwards task events to the UI thread.
-
-
Constructor Summary
Constructors Constructor Description TaskAdapter(TaskListener<T> taskListener)
Creates a newTaskAdapter
that wraps the specified task listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeFailed(Task<T> task)
Called when task execution has failed.void
taskExecuted(Task<T> task)
Called when the task has completed successfully.
-
-
-
Constructor Detail
-
TaskAdapter
public TaskAdapter(TaskListener<T> taskListener)
Creates a newTaskAdapter
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 interfaceTaskListener<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 interfaceTaskListener<T>
- Parameters:
task
- The source of the task event.
-
-