Interface ProgressPlugin.Task

Enclosing interface:
ProgressPlugin

@ProviderType public static interface ProgressPlugin.Task
Represents an ongoing task.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Cancel this task.
    void
    done(String message, Throwable e)
    The task has been completed; optionally with a message and/or exception to indicate the outcome.
    boolean
    Check if this task is canceled.
    void
    worked(int units)
    The specified number of units out of the total have been worked.
  • Method Details

    • worked

      void worked(int units)
      The specified number of units out of the total have been worked. If called after done(), an IllegalStateException may be thrown.
      Parameters:
      units -
    • done

      void done(String message, Throwable e)
      The task has been completed; optionally with a message and/or exception to indicate the outcome. After calling this method, no more work should be performed in the task.
      Parameters:
      message - A message associated with the completion of the task; may be null.
      e - An exception thrown by the task; may be null;
    • isCanceled

      boolean isCanceled()
      Check if this task is canceled.
    • abort

      default void abort()
      Cancel this task. This might not be implemented