Package ca.corbett.extras.progress
Class MultiProgressAdapter
java.lang.Object
ca.corbett.extras.progress.MultiProgressAdapter
- All Implemented Interfaces:
MultiProgressListener
An empty adapter class for MultiProgressListener. None of the methods here do anything.
- Since:
- 2022-05-10
- Author:
- scorbo2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmajorProgressUpdate(int majorStep, int totalMinorSteps, String message) Invoked by the worker when a major work step has begun or is about to begin.booleanminorProgressUpdate(int majorStep, int minorStep, String message) Invoked by the worker at the completion of each minor step of this operation.voidprogressBegins(int totalMajorSteps) Invoked by the worker when an operation has begun or is about to begin.voidInvoked by the worker if the operation was canceled before completion.voidInvoked by the worker when the operation completes.booleanprogressError(String errorSource, String errorDetails) Invoked by the worker if a recoverable error occurs during the scan operation.
-
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:
progressBeginsin interfaceMultiProgressListener- Parameters:
totalMajorSteps- The count of major work steps that will occur during this operation.
-
majorProgressUpdate
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:
majorProgressUpdatein interfaceMultiProgressListener- 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
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:
minorProgressUpdatein interfaceMultiProgressListener- 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
Invoked by the worker if a recoverable error occurs during the scan operation. The operation will continue.- Specified by:
progressErrorin interfaceMultiProgressListener- 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:
progressCompletein interfaceMultiProgressListener
-
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:
progressCanceledin interfaceMultiProgressListener
-