Package ro.isdc.wro.maven.plugin.support
Class ProgressIndicator
- java.lang.Object
-
- ro.isdc.wro.maven.plugin.support.ProgressIndicator
-
public class ProgressIndicator extends java.lang.ObjectResponsible 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 voidaddFoundErrors(int errorsToAdd)This method has a side effect of incrementing the number of resources containing errors.intgetTotalFoundErrors()voidlogSummary()Logs the summary as it was collected at this point.voidonProcessingResource(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.voidreset()resets all counters to zero.
-
-
-
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.
-
-