Interface ProgressCallback

All Known Implementing Classes:
Shell.SimpleStatusProgress

public interface ProgressCallback
A callback used for reporting progress.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    The process has been aborted.
    default void
    An exception occurred, this method is called before aborted().
    default void
    All steps have finished.
    default boolean
    Returns true if the program is running in GUI mode.
    default boolean
    Returns true if the user has requested abortion.
    default void
    log(String msg)
    A log message that should be passed to the UI.
    default void
    A warning that should be passed to the UI.
    default void
    startProgress(int steps)
    Reports that the progress is about to start.
    default void
    startStep(int step, String description, boolean indeterminate)
    A new step has begun.
    default void
    stepDescription(String description)
    Updates the description text for the current step.
    default void
    stepProgress(int percent)
    Progress has been made in the current step.
  • Method Details

    • startProgress

      default void startProgress(int steps)
      Reports that the progress is about to start.
      Parameters:
      steps - Number of steps to expect.
    • startStep

      default void startStep(int step, String description, boolean indeterminate)
      A new step has begun.
      Parameters:
      step - index of the step
      description - A description of the current step
      indeterminate - true if the step is indeterminate (won't call stepProgress(int)
    • stepProgress

      default void stepProgress(int percent)
      Progress has been made in the current step.
      Parameters:
      percent - how much of the current step that is completed
    • stepDescription

      default void stepDescription(String description)
      Updates the description text for the current step.
    • finished

      default void finished()
      All steps have finished.
    • isUserAborting

      default boolean isUserAborting()
      Returns true if the user has requested abortion.
      Returns:
      true if the publishing should stop
    • aborted

      default void aborted()
      The process has been aborted. This method is expected to be called if isUserAborting() is returning true or after exception(Exception) has been called.
    • exception

      default void exception(Exception ex)
      An exception occurred, this method is called before aborted().
    • log

      default void log(String msg)
      A log message that should be passed to the UI.
    • logWarning

      default void logWarning(String msg)
      A warning that should be passed to the UI.
    • isGUI

      default boolean isGUI()
      Returns true if the program is running in GUI mode. If true the process may open GUI components. An example of this is the custom export that asks the user to select a model if the program is running in GUI mode. If not a default value is used.