Interface TaskMonitor

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void allowCancellationRequests()
      Notifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).
      boolean isCancelRequested()
      Checks whether a party has requested that the task be cancelled.
      void report​(int itemsDone, int totalItems, String itemDescription)
      Reports the number of items processed.
      void report​(Exception exception)
      Reports an Exception that occurred.
      void report​(String description)
      Describes the status of the task.
    • Method Detail

      • report

        void report​(String description)
        Describes the status of the task.
        Parameters:
        description - a description of the progress of the overall task
      • report

        void report​(int itemsDone,
                    int totalItems,
                    String itemDescription)
        Reports the number of items processed.
        Parameters:
        itemsDone - the number of items that have been processed
        totalItems - the total number of items being processed, or -1 if the total number is not known
        itemDescription - a one-word description of the items, such as "features"
      • report

        void report​(Exception exception)
        Reports an Exception that occurred. The task may choose to carry on.
        Parameters:
        exception - an Exception that occurred during the execution of the task.
      • allowCancellationRequests

        void allowCancellationRequests()
        Notifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).
      • isCancelRequested

        boolean isCancelRequested()
        Checks whether a party has requested that the task be cancelled. However, the task is not obligated to cancel immediately (or at all).
        Returns:
        whether a party has requested that the task be cancelled