Interface Progress
- All Known Implementing Classes:
DefaultProgress
public interface Progress
The
Progress allows a mojo to report its current state and check if
the user has requested cancellation.-
Method Summary
Modifier and TypeMethodDescriptionbooleanThis 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 reportedvoidReports 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 Details
-
startTask
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.
-