Class DefaultProgress

  • All Implemented Interfaces:
    Progress

    @Named("default")
    public class DefaultProgress
    extends java.lang.Object
    implements Progress
    The default implementation simply log to debug and check for thread interruption
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultProgress​(org.apache.maven.plugin.MojoExecution execution)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isCancelRequested()
      This method should be used to check if the user has requested to finish the current work and break out early.
      void setRemaining​(int work)
      Notifies the remaining amount of work that will be reported
      void startTask​(java.lang.String task, int work)
      Reports that the mojo has started the given task with the given amount of work.
      void worked​(int work)
      Reports a given amount of work was processed
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.codehaus.plexus.build.progress.Progress

        worked
    • Constructor Detail

      • DefaultProgress

        @Inject
        public DefaultProgress​(org.apache.maven.plugin.MojoExecution execution)
    • Method Detail

      • startTask

        public void startTask​(java.lang.String task,
                              int work)
        Description copied from interface: Progress
        Reports that the mojo has started the given task with the given amount of work.
        Specified by:
        startTask in interface Progress
        work - the amount of work that the mojo plan to report, if a value <= 0 is given the amount of work is assumed to be unknown.
      • worked

        public void worked​(int work)
        Description copied from interface: Progress
        Reports a given amount of work was processed
        Specified by:
        worked in interface Progress
      • setRemaining

        public void setRemaining​(int work)
        Description copied from interface: Progress
        Notifies the remaining amount of work that will be reported
        Specified by:
        setRemaining in interface Progress
      • isCancelRequested

        public boolean isCancelRequested()
        Description copied from interface: Progress
        This method should be used to check if the user has requested to finish the current work and break out early.
        Specified by:
        isCancelRequested in interface Progress
        Returns:
        true if a cancel request is currently pending.