FileDocCategorySizeDatePackage
JMXMonitorMgrImpl.javaAPI DocGlassfish v2 API5804Fri May 04 22:23:30 BST 2007com.sun.enterprise.management.monitor

JMXMonitorMgrImpl

public final class JMXMonitorMgrImpl extends com.sun.enterprise.management.support.AMXImplBase

Fields Summary
private static final Set
NOT_SUPERFLUOUS
private static final Set
TYPES
Constructors Summary
public JMXMonitorMgrImpl()

	
Methods Summary
public javax.management.ObjectNamecreateCounterMonitor(java.lang.String name)

    	final AMXCounterMonitorImpl	monitor	= new AMXCounterMonitorImpl();
    	return( registerMonitor( monitor, XTypes.JMX_COUNTER_MONITOR, name ) );
    
public javax.management.ObjectNamecreateGaugeMonitor(java.lang.String name)

    	final AMXGaugeMonitorImpl	monitor	= new AMXGaugeMonitorImpl();
    	return( registerMonitor( monitor, XTypes.JMX_GAUGE_MONITOR, name ) );
    
public javax.management.ObjectNamecreateStringMonitor(java.lang.String name)

    	final AMXStringMonitorImpl	monitor	= new AMXStringMonitorImpl();
    	return( registerMonitor( monitor, XTypes.JMX_STRING_MONITOR, name ) );
    
public java.util.MapgetCounterMonitorObjectNameMap()

    	return( getMap( XTypes.JMX_COUNTER_MONITOR ) );
    
public java.util.MapgetGaugeMonitorObjectNameMap()

    	return( getMap( XTypes.JMX_GAUGE_MONITOR ) );
    
public java.lang.StringgetGroup()

		return( AMX.GROUP_UTILITY );
	
private java.util.MapgetMap(java.lang.String j2eeType)

    	final Map<String,AMX> m	= getDomainRoot().getContaineeMap( j2eeType );
    	
    	return( Util.toObjectNames( m ) );
    
private javax.management.ObjectNamegetMonitor(java.lang.String name)

			
    
    	 
        
    
    	final Set<AMX>	s	= getDomainRoot().getByNameContaineeSet( TYPES, name );
    	
    	final AMX	mon	= Util.asAMX( GSetUtil.getSingleton( s ));
    	
    	return( Util.getObjectName( mon ) );
    
protected final java.util.SetgetNotSuperfluousMethods()

            
            
	      
	
	
	    return GSetUtil.newSet( super.getNotSuperfluousMethods(), NOT_SUPERFLUOUS );
	
public java.util.MapgetStringMonitorObjectNameMap()

    	return( getMap( XTypes.JMX_STRING_MONITOR ) );
    
private javax.management.ObjectNameregisterMonitor(java.lang.Object impl, java.lang.String j2eeType, java.lang.String name)

		final ObjectName	self	= getObjectName();
		
		final String	domain			= self.getDomain();
		final String	requiredProps	= Util.makeRequiredProps( j2eeType, name );
		
		ObjectName	objectName	= Util.newObjectName( domain, requiredProps );
		try
		{
			objectName	= registerMBean( impl, objectName );
		}
		catch( Exception e )
		{
			throw new RuntimeException( e );
		}
		
		return( objectName );
	
public voidremove(java.lang.String name)

    	final ObjectName	objectName	= getMonitor( name );
    	if ( objectName == null )
    	{
    		throw new IllegalArgumentException( name );
    	}
    	
    	try
    	{
    		getMBeanServer().unregisterMBean( objectName );
    	}
    	catch( JMException e )
    	{
    		throw new RuntimeException( e );
    	}