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

JMXMonitorMgrTest

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

Fields Summary
Constructors Summary
public JMXMonitorMgrTest()

	
Methods Summary
public com.sun.appserv.management.monitor.JMXMonitorMgrgetMgr()

		return( getDomainRoot().getJMXMonitorMgr() );
	
public voidtestCreateRemoveStringMonitor()

		final JMXMonitorMgr	mgr	= getMgr();
		
		final AMXStringMonitor	mon	= mgr.createStringMonitor( getClass().getName() + "Test" );
		final ObjectName	objectName	= Util.getObjectName( mon );
		
		mon.setObservedAttribute( "Group" );
		final ObjectName	observee	= Util.getObjectName( mgr );
		assert( observee != null );
		mon.addObservedObject( observee );
		assert mon.containsObservedObject( observee );
		mon.removeObservedObject( observee );
		
		assert( getConnection().isRegistered( objectName ) );
		mgr.remove( mon.getName() );
		assert( ! getConnection().isRegistered( objectName ) );
	
public voidtestGetMgr()

		final JMXMonitorMgr	mgr	= getMgr();
		assert( mgr != null );