Interface TaskAdvisor


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

      • 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