org.apache.geronimo.management.stats
Class StatsImpl

java.lang.Object
  extended by org.apache.geronimo.management.stats.StatsImpl
All Implemented Interfaces:
Serializable, Stats
Direct Known Subclasses:
EJBModuleStatsImpl, EJBStatsImpl, JavaMailStatsImpl, JCAConnectionStatsImpl, JCAStatsImpl, JDBCConnectionStatsImpl, JDBCStatsImpl, JettyWebContainerStatsImpl, JMSConnectionStatsImpl, JMSEndpointStatsImpl, JMSSessionStatsImpl, JMSStatsImpl, JTAStatsImpl, JVMStatsImpl, ServletStatsImpl, ThreadPool.PoolStatsImpl, TomcatWebConnectorStatsImpl, URLStatsImpl, WebConnectorStatsImpl, WebModuleStatsImpl

public class StatsImpl
extends Object
implements Stats, Serializable

Geronimo implementation of the JSR-77 Stats interface. Dynamically tracks available statistics for its subclasses, to make it easy to iterate available statistics without knowing exactly what kind of class you're looking at.

See Also:
Serialized Form

Constructor Summary
StatsImpl()
           
 
Method Summary
protected  void addStat(String name, StatisticImpl value)
           
 Statistic getStatistic(String statisticName)
           
 String[] getStatisticNames()
           
 Statistic[] getStatistics()
           
protected  void removeStat(String name)
          Used when the available statistics are dynamic (e.g. depend on the current clients of the service, etc.).
 void setLastSampleTime()
          Set the lastSampleTime for all statistics to System.currentTimeMillis()
 void setStartTime()
          Set the startTime for all statistics to System.currentTimeMillis()
 void setStartTime(long time)
          Set the startTime for all statistics to the given value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsImpl

public StatsImpl()
Method Detail

addStat

protected void addStat(String name,
                       StatisticImpl value)

removeStat

protected void removeStat(String name)
Used when the available statistics are dynamic (e.g. depend on the current clients of the service, etc.).

Parameters:
name - The statistic to remove

setStartTime

public void setStartTime()
Set the startTime for all statistics to System.currentTimeMillis()


setStartTime

public void setStartTime(long time)
Set the startTime for all statistics to the given value

Parameters:
time -

setLastSampleTime

public void setLastSampleTime()
Set the lastSampleTime for all statistics to System.currentTimeMillis()


getStatistic

public Statistic getStatistic(String statisticName)
Specified by:
getStatistic in interface Stats

getStatisticNames

public String[] getStatisticNames()
Specified by:
getStatisticNames in interface Stats

getStatistics

public Statistic[] getStatistics()
Specified by:
getStatistics in interface Stats


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.