Interface Progress
-
- All Known Implementing Classes:
DefaultProgress
public interface ProgressTheProgressallows a mojo to report its current state and check if the user has requested cancellation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanisCancelRequested()This method should be used to check if the user has requested to finish the current work and break out early.voidsetRemaining(int work)Notifies the remaining amount of work that will be reportedvoidstartTask(java.lang.String task, int work)Reports that the mojo has started the given task with the given amount of work.default voidworked()Reports one unit of work to be processedvoidworked(int work)Reports a given amount of work was processed
-
-
-
Method Detail
-
startTask
void startTask(java.lang.String task, int work)Reports that the mojo has started the given task with the given amount of work.- Parameters:
task-work- the amount of work that the mojo plan to report, if a value<= 0is given the amount of work is assumed to be unknown.
-
worked
void worked(int work)
Reports a given amount of work was processed- Parameters:
work-
-
worked
default void worked()
Reports one unit of work to be processed
-
setRemaining
void setRemaining(int work)
Notifies the remaining amount of work that will be reported- Parameters:
work-
-
isCancelRequested
boolean isCancelRequested()
This method should be used to check if the user has requested to finish the current work and break out early.- Returns:
trueif a cancel request is currently pending.
-
-