Class ProgressIndicator


  • public class ProgressIndicator
    extends java.lang.Object
    Responsible for logging progress related details. Useful to find the best balance between "to much" vs "none" details. This implementation will indicate the state of the progress after a given period of time (ex: each 5 seconds).
    Since:
    1.7.0
    Author:
    Alex Objelean
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgressIndicator​(org.apache.maven.plugin.logging.Log log)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFoundErrors​(int errorsToAdd)
      This method has a side effect of incrementing the number of resources containing errors.
      int getTotalFoundErrors()  
      void logSummary()
      Logs the summary as it was collected at this point.
      void onProcessingResource​(ro.isdc.wro.model.resource.Resource resource)
      A method which should be invoked on each new resource processing, having as a side effect an increment of the counter holding the number of total processed resources.
      void reset()
      resets all counters to zero.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProgressIndicator

        public ProgressIndicator​(org.apache.maven.plugin.logging.Log log)
    • Method Detail

      • reset

        public void reset()
        resets all counters to zero.
      • logSummary

        public void logSummary()
        Logs the summary as it was collected at this point.
      • onProcessingResource

        public void onProcessingResource​(ro.isdc.wro.model.resource.Resource resource)
        A method which should be invoked on each new resource processing, having as a side effect an increment of the counter holding the number of total processed resources.
      • addFoundErrors

        public void addFoundErrors​(int errorsToAdd)
        This method has a side effect of incrementing the number of resources containing errors.
        Parameters:
        errorsToAdd - number of errors found during processing. This number will be added to the counter holding total number of found errors.
      • getTotalFoundErrors

        public final int getTotalFoundErrors()
        Returns:
        a total number of found errors.