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, 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. Not sure when you'd want to do that, but hey.

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()
           
 void setStartTime()
           
 
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()

setLastSampleTime

public void setLastSampleTime()

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-2007 Apache Software Foundation. All Rights Reserved.