Class SerialTasks

java.lang.Object
org.praxislive.ide.core.api.AbstractTask
org.praxislive.ide.core.api.SerialTasks
All Implemented Interfaces:
org.openide.util.Cancellable, Task

public class SerialTasks extends AbstractTask
  • Constructor Details

    • SerialTasks

      public SerialTasks(List<Task> tasks)
    • SerialTasks

      public SerialTasks(Task... tasks)
  • Method Details

    • remaining

      public int remaining()
    • beforeExecute

      protected void beforeExecute()
    • afterExecute

      protected void afterExecute()
    • beforeTask

      protected void beforeTask(Task task)
    • afterTask

      protected void afterTask(Task task)
    • handleExecute

      protected final void handleExecute() throws Exception
      Description copied from class: AbstractTask
      Handle a call to execution. The state will have been updated to Task.State.RUNNING prior to this method. This method should call AbstractTask.updateState(org.praxislive.ide.core.api.Task.State) to change the state returned from AbstractTask.execute(), or update the state at a later point. If this method throws an exception, the task will be set to the Task.State.ERROR state.
      Specified by:
      handleExecute in class AbstractTask
      Throws:
      Exception - if the task cannot be executed
    • handleCancel

      protected boolean handleCancel()
      Description copied from class: AbstractTask
      If the task is cancellable, this method should be overridden and handle any necessary steps, returning true if the task has been cancelled. The state will be updated automatically.
      Overrides:
      handleCancel in class AbstractTask
      Returns:
      true to have task marked as cancelled