FileDocCategorySizeDatePackage
BootUtil.javaAPI DocGlassfish v2 API4252Fri May 04 22:23:42 BST 2007com.sun.enterprise.management.support

BootUtil

public final class BootUtil extends Object
Utilities to help boot up AMX.

Fields Summary
private final String
mAppserverDomainName
private final String
mAMX_JMXDomain
private static BootUtil
INSTANCE
private boolean
mAMXReady
private final boolean
mOfflineAMX
Constructors Summary
private BootUtil(String appserverDomainName, boolean offline)

	 
		
	
	         
	         
	
		AMXServerLogger.getInstance();
		AMXMBeanRootLogger.getInstance();
		
		mAppserverDomainName	= appserverDomainName;
		mAMX_JMXDomain		    = appserverDomainName;
		
		mAMXReady   = false;
		
		mOfflineAMX = offline;
	
Methods Summary
public java.lang.StringgetAMXJMXDomainName()

		return( mAMX_JMXDomain );
	
public booleangetAMXReady()

	    return mAMXReady;
	
public java.lang.StringgetAMXSupportJMXDomain()

	    return getAMXJMXDomainName() + "-support";
	
public java.lang.StringgetAppserverDomainName()

		return( mAppserverDomainName );
	
public static synchronized com.sun.enterprise.management.support.BootUtilgetInstance()

	    if ( INSTANCE == null )
	    {   
	        throw new IllegalArgumentException( "must call init() first" );
	    }

		return( INSTANCE );
	
private javax.management.ObjectNamegetObjectName(java.lang.String props)

		final String	domain	= getAMXSupportJMXDomain();
		
		return( Util.newObjectName( domain, props ) );
	
public booleangetOffline()

        return mOfflineAMX;
    
public java.lang.StringgetServerName()
Return the name of the server in which this code is running.

        return  AdminService.getAdminService().getAdminContext().getServerName();
    
public static synchronized voidinit(boolean offline)

		INSTANCE	= new BootUtil( "amx", offline );
	
public voidsetAMXReady(boolean ready)

	    if ( mAMXReady && ! ready )
	    {
	        throw new IllegalArgumentException();
	    }
	    
	    mAMXReady   = ready;