net.java.dev.moskito.core.logging
Class DefaultStatsLogger

java.lang.Object
  extended by net.java.dev.moskito.core.logging.DefaultStatsLogger
All Implemented Interfaces:
IUpdateable

public class DefaultStatsLogger
extends Object
implements IUpdateable

The DefaultStatsLogger class providing a logging utility for stats default value. The default value of a IStat is the value from begin of counting (usually start of VM or first request).

Author:
lrosenberg

Field Summary
private  String id
           
private  ILogOutput output
           
private  int outputIntervalInSeconds
           
private  IStatsProducer target
           
 
Constructor Summary
DefaultStatsLogger(IStatsProducer aTarget, ILogOutput anOutput)
          Creates a new DefaultStatsLogger with 60 seconds output interval.
DefaultStatsLogger(IStatsProducer aTarget, ILogOutput anOutput, int anOutputIntervalInSeconds)
          Creates a new DefaultStatsLogger.
 
Method Summary
 void update()
          This method will be called if an update occures.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

private IStatsProducer target

output

private ILogOutput output

id

private String id

outputIntervalInSeconds

private int outputIntervalInSeconds
Constructor Detail

DefaultStatsLogger

public DefaultStatsLogger(IStatsProducer aTarget,
                          ILogOutput anOutput)
Creates a new DefaultStatsLogger with 60 seconds output interval.

Parameters:
aTarget - the stat producer to monitor.
anOutput - output logger.

DefaultStatsLogger

public DefaultStatsLogger(IStatsProducer aTarget,
                          ILogOutput anOutput,
                          int anOutputIntervalInSeconds)
Creates a new DefaultStatsLogger.

Parameters:
aTarget - the stats producer to monitor.
anOutput - the output logger.
anOutputIntervalInSeconds - output interval in seconds.
Method Detail

update

public void update()
Description copied from interface: IUpdateable
This method will be called if an update occures.

Specified by:
update in interface IUpdateable


Copyright © 2006 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework