Class MultiProgressAdapter

java.lang.Object
ca.corbett.extras.progress.MultiProgressAdapter
All Implemented Interfaces:
MultiProgressListener

public class MultiProgressAdapter extends Object implements MultiProgressListener
An empty adapter class for MultiProgressListener. None of the methods here do anything.
Since:
2022-05-10
Author:
scorbo2
  • Constructor Details

    • MultiProgressAdapter

      public MultiProgressAdapter()
  • Method Details

    • progressBegins

      public void progressBegins(int totalMajorSteps)
      Invoked by the worker when an operation has begun or is about to begin. The number of major work steps is provided here. At the beginning of each major work step, majorProgressUpdate will be invoked with the number of minor steps needed for this major step.
      Specified by:
      progressBegins in interface MultiProgressListener
      Parameters:
      totalMajorSteps - The count of major work steps that will occur during this operation.
    • majorProgressUpdate

      public boolean majorProgressUpdate(int majorStep, int totalMinorSteps, String message)
      Invoked by the worker when a major work step has begun or is about to begin. The number of minor work steps required for this major step is provided.
      Specified by:
      majorProgressUpdate in interface MultiProgressListener
      Parameters:
      majorStep - The index of the major step that is beginning.
      totalMinorSteps - The count of minor work steps required for this major step to complete.
      message - An optional message describing this major step.
      Returns:
      Return true to continue processing, or false if you wish to cancel the operation.
    • minorProgressUpdate

      public boolean minorProgressUpdate(int majorStep, int minorStep, String message)
      Invoked by the worker at the completion of each minor step of this operation. You can cancel the rest of the operation by returning false here.
      Specified by:
      minorProgressUpdate in interface MultiProgressListener
      Parameters:
      majorStep - The index of the major step in progress.
      minorStep - The index of the minor step that just completed.
      message - An optional message about the current minor step.
      Returns:
      Return true to continue processing, or false if you wish to cancel the operation.
    • progressError

      public boolean progressError(String errorSource, String errorDetails)
      Invoked by the worker if a recoverable error occurs during the scan operation. The operation will continue.
      Specified by:
      progressError in interface MultiProgressListener
      Parameters:
      errorSource - A message describing what caused the error.
      errorDetails - Additional details about the error.
      Returns:
      Return true to continue processing, or false if you wish to cancel the operation.
    • progressComplete

      public void progressComplete()
      Invoked by the worker when the operation completes. No further messages will be invoked unless a new operation is requested.
      Specified by:
      progressComplete in interface MultiProgressListener
    • progressCanceled

      public void progressCanceled()
      Invoked by the worker if the operation was canceled before completion. No further messages will be invoked unless a new operation is requested.
      Specified by:
      progressCanceled in interface MultiProgressListener