FileDocCategorySizeDatePackage
WebServiceEndpointMonitorTest.javaAPI DocGlassfish v2 API4824Fri May 04 22:24:06 BST 2007com.sun.enterprise.management.monitor

WebServiceEndpointMonitorTest

public final class WebServiceEndpointMonitorTest extends AMXMonitorTestBase

Fields Summary
Constructors Summary
public WebServiceEndpointMonitorTest()

    
Methods Summary
public voidtestStats()

  		final QueryMgr	q	= getQueryMgr();
  		
  		final Set	wsMonitors	= q.queryJ2EETypeSet(
        XTypes.WEBSERVICE_ENDPOINT_MONITOR );
  		
  		if (  wsMonitors.size() == 0 )
  		{
  			warning( "WebServiceEndpointMonitorTest: no MBeans found to test.");
  		}
  		else
  		{
            Iterator itr = wsMonitors.iterator();
  			while ( itr.hasNext() )
  			{
                WebServiceEndpointMonitor m = (WebServiceEndpointMonitor)
                itr.next();

  				final WebServiceEndpointAggregateStats		s	= 
                    m.getWebServiceEndpointAggregateStats();
  				
  				// verify that we can get each Statistic; 
                // there was a problem at one time

                final CountStatistic r1	= s.getTotalFaults();
                assert( r1 != null );
	    
                final CountStatistic r2	= s.getTotalNumSuccess() ;
                assert( r2 != null );
	    
                //final AverageRangeStatistic r3 = s.getResponseTime();
                //assert( r3 != null );

                final NumberStatistic c1 = s.getThroughput() ;
                assert( c1 != null );
	    
                final CountStatistic c2 = s.getTotalAuthFailures();
                assert( c2 != null );
	    
                final CountStatistic c3 = s.getTotalAuthSuccesses();
                assert( c3 != null );
	    
  			}
  		}