Package ca.corbett.extras.progress
Class SimpleProgressAdapter
java.lang.Object
ca.corbett.extras.progress.SimpleProgressAdapter
- All Implemented Interfaces:
SimpleProgressListener
Simple adapter class for SimpleProgressListener. None of these methods do anything.
- Since:
- 2022-05-10
- Author:
- scorbo2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprogressBegins(int totalStepCount) Invoked by the worker when an operation has begun or is about to begin.voidInvoked by the worker if the operation is 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.booleanprogressUpdate(int currentStep, String message) Invoked by the worker at the completion of each step of this operation.
-
Constructor Details
-
SimpleProgressAdapter
public SimpleProgressAdapter()
-
-
Method Details
-
progressBegins
public void progressBegins(int totalStepCount) Invoked by the worker when an operation has begun or is about to begin.- Specified by:
progressBeginsin interfaceSimpleProgressListener- Parameters:
totalStepCount- The total steps that will occur during this operation.
-
progressUpdate
Invoked by the worker at the completion of each step of this operation. You can cancel the rest of the operation by returning false here.- Specified by:
progressUpdatein interfaceSimpleProgressListener- Parameters:
currentStep- The numeric index of the current step in this operation.message- An informational message about the current 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 interfaceSimpleProgressListener- 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 interfaceSimpleProgressListener
-
progressCanceled
public void progressCanceled()Invoked by the worker if the operation is canceled before completion. No further messages will be invoked unless a new operation is requested.- Specified by:
progressCanceledin interfaceSimpleProgressListener
-