FileDocCategorySizeDatePackage
Observer.javaAPI DocGlassfish v2 API3546Fri May 04 22:23:50 BST 2007com.sun.enterprise.management

Observer

public final class Observer extends Object
Observes various things as tests are run.

Fields Summary
private static Observer
INSTANCE
private final RegistrationListener
mListener
private final com.sun.appserv.management.DomainRoot
mDomainRoot
Constructors Summary
private Observer(com.sun.appserv.management.DomainRoot domainRoot)

    
		
	     
	
	    mDomainRoot = domainRoot;
	    
	    final ConnectionSource connSource   =
	        Util.getExtra(domainRoot).getConnectionSource();
	    
        try
        {
            mListener   = RegistrationListener.createInstance( "Observer",
                connSource.getExistingMBeanServerConnection() );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
	
Methods Summary
public static synchronized com.sun.enterprise.management.Observercreate(com.sun.appserv.management.DomainRoot domainRoot)

	    if ( INSTANCE == null )
	    {
	        INSTANCE    = new Observer( domainRoot );
	    }
	    else
	    {
	        throw new IllegalArgumentException();
	    }
	    return INSTANCE;
	
public java.util.SetgetCurrentlyRegisteredAMX()

	    return mListener.getCurrentlyRegistered();
	
public static com.sun.enterprise.management.ObservergetInstance()

	    return INSTANCE;
	
public RegistrationListenergetRegistrationListener()

	    return mListener;
	
public voidnotifsLost()

	    mListener.notifsLost();