Class 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 new TaskAdapter 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.
      • 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.