FileDocCategorySizeDatePackage
WebServiceMonitorTest.javaAPI DocGlassfish v2 API5685Fri May 04 22:24:04 BST 2007com.sun.enterprise.management.ext.wsmgmt

WebServiceMonitorTest

public final class WebServiceMonitorTest extends com.sun.enterprise.management.AMXTestBase

Fields Summary
Constructors Summary
public WebServiceMonitorTest()

    
Methods Summary
public static com.sun.enterprise.management.CapabilitiesgetCapabilities()

	    return getOfflineCapableCapabilities( false );
	
public voidtestMonitorMBeans()

        assert (getDomainRoot().getWebServiceMgr() != null);

       final Set<WebServiceEndpointMonitor>   ms   =
        getDomainRoot().getQueryMgr().queryJ2EETypeSet( XTypes.WEBSERVICE_ENDPOINT_MONITOR);

       for( final WebServiceEndpointMonitor m : ms )
       {
            System.out.println("\n \n Name of web service is " + m.getName());

            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 );
            System.out.println(" total num fault is "+ r1.getCount());

            final CountStatistic r2 = s.getTotalNumSuccess() ;
            assert( r2 != null );
            System.out.println(" total num success is "+ r2.getCount());

            final CountStatistic r3 = s.getAverageResponseTime();
            assert( r3 != null );
            System.out.println("avg resp is "+ r3.getCount());

            final NumberStatistic c1 = s.getThroughput() ;
            assert( c1 != null );
            System.out.println(" through put is "+ c1.getCurrent());

            final CountStatistic c2 = s.getTotalAuthFailures();
            assert( c2 != null );
            System.out.println(" total num auth success is "+ c2.getCount());

            final CountStatistic c3 = s.getTotalAuthSuccesses();
            assert( c3 != null );
            System.out.println(" total num auth failure is "+ c3.getCount());

       }