net.sourceforge.basher.impl
Class StdOutCollector
java.lang.Object
net.sourceforge.basher.impl.AbstractCollector
net.sourceforge.basher.impl.StdOutCollector
- All Implemented Interfaces:
- EventListener, Collector, BasherEventListener, org.ops4j.gaderian.events.RegistryShutdownListener
public class StdOutCollector
- extends AbstractCollector
- implements Collector
- Version:
- 1.0
- Author:
- Johan Lindquist
Method Summary |
protected void |
closeOpenResources()
|
void |
fail(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos,
Throwable throwable)
Reports a task's failure to run together with the time time elapsed for the failure. |
protected void |
initializeCollector(BasherContext basherContext)
|
Average |
markAverage()
Informs the collector that a collection period has finished. |
void |
notRun(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
Reports a task's wish to not run altogether with the time time elapsed for it to determine this. |
void |
success(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
Reports a task's successful invocation together with the time elapsed for the task to run. |
Methods inherited from class net.sourceforge.basher.impl.AbstractCollector |
basherEvent, getAverages, getFailures, getNotRun, getSuccesses, getTotal, isCollecting, registryDidShutdown, setLog, setTimeSource, startCollecting, stopCollecting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StdOutCollector
public StdOutCollector()
initializeCollector
protected void initializeCollector(BasherContext basherContext)
throws Exception
- Specified by:
initializeCollector
in class AbstractCollector
- Throws:
Exception
closeOpenResources
protected void closeOpenResources()
- Specified by:
closeOpenResources
in class AbstractCollector
success
public void success(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
- Description copied from interface:
Collector
- Reports a task's successful invocation together with the time elapsed for the task to run.
- Specified by:
success
in interface Collector
- Overrides:
success
in class AbstractCollector
- Parameters:
taskExecutionContext
- The task execution context wrapping the Task
that was invokedelapsedTime
- The time it took for the task to run
notRun
public void notRun(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
- Description copied from interface:
Collector
- Reports a task's wish to not run altogether with the time time elapsed for it to determine this.
- Specified by:
notRun
in interface Collector
- Overrides:
notRun
in class AbstractCollector
- Parameters:
taskExecutionContext
- The task execution context wrapping the Task
that didn't wish to runelapsedTime
- The time it took for the task to run and determine it didn't want to run
fail
public void fail(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos,
Throwable throwable)
- Description copied from interface:
Collector
- Reports a task's failure to run together with the time time elapsed for the failure. The (possible) cause of the
failure is also provided.
- Specified by:
fail
in interface Collector
- Overrides:
fail
in class AbstractCollector
- Parameters:
taskExecutionContext
- The task execution context wrapping the Task
that failedelapsedTime
- The time it took for the task to run and fail.throwable
- The cause of the failure. This may be null if the cause of the failure is not an exception.
markAverage
public Average markAverage()
- Description copied from interface:
Collector
- Informs the collector that a collection period has finished.
- Specified by:
markAverage
in interface Collector
- Overrides:
markAverage
in class AbstractCollector
Copyright © 2006-2010 Basher Team. All Rights Reserved.