FileDocCategorySizeDatePackage
ServletMonitorImpl.javaAPI DocGlassfish v2 API3992Fri May 04 22:23:32 BST 2007com.sun.enterprise.management.monitor

ServletMonitorImpl

public class ServletMonitorImpl extends MonitoringStatsImplBase

Fields Summary
Constructors Summary
public ServletMonitorImpl(com.sun.enterprise.management.support.Delegate delegate)

		super( XTypes.SERVLET_MONITOR, delegate );
	
Methods Summary
public com.sun.appserv.management.monitor.statistics.AltServletStatsgetAltServletStats()

		return( (AltServletStats)getStats() );
	
protected final javax.management.j2ee.statistics.Statistic[]getStatisticsFromDelegate(com.sun.enterprise.management.support.Delegate d)
[WORKAROUND] Underlying MBean supplies extra, non-standard and redundant Statistics; make sure expose only those we advertise in AltServletStats (unit tests will fail otherwise). Does this still need to be done in 9.0?

		final Statistic[]	fromSuper	= super.getStatisticsFromDelegate( d );
		
		final Map<String,Statistic>	m	= J2EEUtil.statisticsToMap( fromSuper );

		final Statistic[]	result	= new Statistic[ 6 ];
		
		result[ 0 ]	= (Statistic)m.get( "ServiceTime" );  // from ServletStats
		result[ 1 ]	= (Statistic)m.get( "ErrorCount" );  // from AltServletStats
		result[ 2 ]	= (Statistic)m.get( "RequestCount" );  // from AltServletStats
		result[ 3 ]	= (Statistic)m.get( "ProcessingTime" );  // from AltServletStats
		result[ 4 ]	= (Statistic)m.get( "MaxTime" );  // from AltServletStats
		result[ 5 ]	= (Statistic)m.get( "ServiceTime" );  // from AltServletStats
		
		return result;
	
protected java.lang.ClassgetStatsInterface()

		return( AltServletStats.class );