Package org.gvsig.utils.swing.threads
Interface Monitorable
- All Known Subinterfaces:
CancellableMonitorable
- All Known Implementing Classes:
AbstractMonitorableTask,DefaultCancellableMonitorable
public interface Monitorable
Interface to monitorize a long process, which operates
in many individual steps
- Author:
- azabala
-
Method Summary
Modifier and TypeMethodDescriptionintReturn the number of steps processedintintbooleanTells if the process is monitoring is definedvoidReport to monitor that an individual step was processed.voidreset()Sets initial default monitorization valuesvoidsetCurrentStep(int currentStep) Allows to modify current step.voidsetDeterminatedProcess(boolean defined) Reports to the monitor that the process is monitoring is (or not) a defined process.voidsetFinalStep(int step) report monitor what number has the final step of the process is monitoring (no apply to undefined process)voidsetInitialStep(int step) report monitor what number has the initial step of the process is monitoring
-
Method Details
-
reportStep
void reportStep()Report to monitor that an individual step was processed. -
getCurrentStep
int getCurrentStep()Return the number of steps processed- Returns:
-
setCurrentStep
void setCurrentStep(int currentStep) Allows to modify current step. -
setInitialStep
void setInitialStep(int step) report monitor what number has the initial step of the process is monitoring- Parameters:
step-
-
getInitialStep
int getInitialStep() -
getFinalStep
int getFinalStep() -
setFinalStep
void setFinalStep(int step) report monitor what number has the final step of the process is monitoring (no apply to undefined process)- Parameters:
step-
-
setDeterminatedProcess
void setDeterminatedProcess(boolean defined) Reports to the monitor that the process is monitoring is (or not) a defined process. A defined process is a process whose number of step is predefined (in front of not defined process, which may run in an unknown number of steps)- Parameters:
defined-
-
isDeterminatedProcess
boolean isDeterminatedProcess()Tells if the process is monitoring is defined- Returns:
-
reset
void reset()Sets initial default monitorization values
-