FileDocCategorySizeDatePackage
EJBTimedObjectStatsImpl.javaAPI DocGlassfish v2 API4370Fri May 04 22:32:56 BST 2007com.sun.ejb.base.stats

EJBTimedObjectStatsImpl

public class EJBTimedObjectStatsImpl extends StatsImpl implements com.sun.enterprise.admin.monitor.stats.TimerServiceStats
A Class for providing stats related to Timers created from beans of type STATELESS/ENTITY/MESSAGE_DRIVEN

Fields Summary
protected com.sun.ejb.spi.stats.EJBTimedObjectStatsProvider
timerDelegate
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
createdCountStat
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
removedCountStat
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
deliveredCountStat
Constructors Summary
public EJBTimedObjectStatsImpl(com.sun.ejb.spi.stats.EJBTimedObjectStatsProvider delegate)

//	super(delegate, "javax.management.j2ee.statistics.TimerBeanStats");
	this.timerDelegate = delegate;

	initStats();
    
Methods Summary
public javax.management.j2ee.statistics.CountStatisticgetNumTimersCreated()

	createdCountStat.setCount(timerDelegate.getTimersCreated());
	return (CountStatistic) createdCountStat.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumTimersDelivered()

	deliveredCountStat.setCount(timerDelegate.getTimersDelivered());
	return (CountStatistic) deliveredCountStat.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumTimersRemoved()

	removedCountStat.setCount(timerDelegate.getTimersRemoved());
	return (CountStatistic) removedCountStat.modifiableView();
    
private voidinitStats()

	createdCountStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumTimersCreated"));
	removedCountStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumTimersRemoved"));
	deliveredCountStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumTimersDelivered"));
    
public voidmonitoringLevelChanged(boolean monitoringOn)

        timerDelegate.monitoringLevelChanged( monitoringOn );