FileDocCategorySizeDatePackage
OfflineConfigIniter.javaAPI DocGlassfish v2 API4444Fri May 04 22:30:34 BST 2007com.sun.appserv.management.config

OfflineConfigIniter

public final class OfflineConfigIniter extends Object
Private interface, DO NOT USE

Fields Summary
private final MBeanServer
mServer
private final File
mDomainXML
private final ObjectName
mLoader
private final com.sun.appserv.management.DomainRoot
mDomainRoot
private static final String
LOADER_CLASSNAME
private final Class[]
LOADER_CONSTRUCTOR_SIG
public static final String
NAME
Constructors Summary
public OfflineConfigIniter(MBeanServer server, File domainXML)

    
        
    
          
                  
    
        mServer     = server;
        mDomainXML  = domainXML;
        mLoader     = initLoader();
        
        mDomainRoot = ProxyFactory.getInstance( server ).getDomainRoot();
    
Methods Summary
public com.sun.appserv.management.DomainRootgetDomainRoot()

        return mDomainRoot;
    
private javax.management.ObjectNameinitLoader()

    
         
    
    
        ObjectName  loaderObjectName    = null;
        
        try
        {
            // can't import it because it's this code is in client API.
            // We want this feature to work only if the requisite classes are present,
            // but we can't include them.
            //
            final Class         loaderClass = Class.forName( LOADER_CLASSNAME );
            final Constructor   constructor =
                loaderClass.getConstructor( LOADER_CONSTRUCTOR_SIG );
            
            final Object    loader      = constructor.newInstance( mServer, mDomainXML );
            
            final String domain = AMX.JMX_DOMAIN + "-support";
            loaderObjectName  = Util.newObjectName( domain, Util.makeNameProp( NAME ) );
            loaderObjectName  =
                mServer.registerMBean( loader, loaderObjectName ).getObjectName();
        }
        catch(Throwable t)
        {
            t.printStackTrace();
            
            throw new RuntimeException( t );
        }
        
        return loaderObjectName;