FileDocCategorySizeDatePackage
ComSunAppservTest.javaAPI DocGlassfish v2 API4247Fri May 04 22:24:06 BST 2007com.sun.enterprise.management.support

ComSunAppservTest

public class ComSunAppservTest extends com.sun.enterprise.management.AMXTestBase
Base class for testing the com.sun.appserv MBeans relied upon by AMX.

Fields Summary
Constructors Summary
public ComSunAppservTest()

    
Methods Summary
public java.util.MapgetAllComSunAppservCategory(java.lang.String category)

return
Map, keyed by value of 'type' property from ObjectName

        final ObjectName    pattern =
            Util.newObjectName( "com.sun.appserv:category=" + category + ",*");
        final Set<ObjectName> objectNames =
            JMXUtil.queryNames( getMBeanServerConnection(), pattern, null );
        
        final HashMap<String,ObjectName>   m   = new HashMap<String,ObjectName>();
        for( final ObjectName objectName : objectNames )
        {
            final String    type    = objectName.getKeyProperty( "type" );
            if ( type != null )
            {
                m.put( type, objectName );
            }
        }
        
        return m;
    
public java.util.MapgetAllComSunAppservConfig()

        return getAllComSunAppservCategory( "config" );
    
public java.util.MapgetAllComSunAppservMonitor()

        return getAllComSunAppservCategory( "monitor" );