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 newTaskAdapterthat wraps the specified task listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteFailed(Task<T> task)Called when task execution has failed.voidtaskExecuted(Task<T> task)Called when the task has completed successfully.
-
-
-
Constructor Detail
-
TaskAdapter
public TaskAdapter(TaskListener<T> taskListener)
Creates a newTaskAdapterthat 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:TaskListenerCalled when the task has completed successfully.- Specified by:
taskExecutedin interfaceTaskListener<T>- Parameters:
task- The source of the task event.
-
executeFailed
public void executeFailed(Task<T> task)
Description copied from interface:TaskListenerCalled when task execution has failed.- Specified by:
executeFailedin interfaceTaskListener<T>- Parameters:
task- The source of the task event.
-
-