Interface TaskAdvisor


public interface TaskAdvisor
Defines an interface that a task may use to find out whether it should exit early.
  • Method Summary

    Modifier and Type Method Description
    boolean cancelRequested()
    Tests whether the task is being asked to cancel early.
    void setStatus​(Task.Status status)
    Sets the status of the task.
  • Method Details

    • cancelRequested

      boolean cancelRequested()
      Tests whether the task is being asked to cancel early.
      Returns:
      true, if the task should cancel itself
    • setStatus

      void setStatus​(Task.Status status)
      Sets the status of the task.
      Parameters:
      status - the new status