FileDocCategorySizeDatePackage
CustomMBeanRegistrationHelper.javaAPI DocGlassfish v2 API3722Fri May 04 22:33:46 BST 2007com.sun.enterprise.admin.server.core

CustomMBeanRegistrationHelper

public class CustomMBeanRegistrationHelper extends Object

Fields Summary
private final MBeanServer
mbs
private final com.sun.enterprise.config.ConfigContext
cc
private final String
myName
private final CustomMBeanRegistration
cmr
Constructors Summary
CustomMBeanRegistrationHelper(MBeanServer mbs, com.sun.enterprise.config.ConfigContext cc)

        this.mbs     = mbs;
        this.cc     = cc;
        myName      = System.getProperty(SystemPropertyConstants.SERVER_NAME);
        cmr         = mbeanRegistrationFactory();
    
Methods Summary
private java.util.ListgetMBeans2Register()

        return ( ServerBeansFactory.getFullyEnabledUserDefinedMBeans(cc, myName) );
    
private CustomMBeanRegistrationmbeanRegistrationFactory()

        final String CUSTOM_REGRISTRATION_IMPL_CLASS = "com.sun.enterprise.admin.mbeans.custom.loading.CustomMBeanRegistrationImpl";
        final Class c           = Class.forName(CUSTOM_REGRISTRATION_IMPL_CLASS);
        final Class[] pts       = new Class[]{javax.management.MBeanServer.class};
        final Constructor ctor  = c.getConstructor(pts);
        final Object[] aps      = new Object[]{mbs};
        return ( (CustomMBeanRegistration) ctor.newInstance(aps) );
    
voidregisterMBeans()

        final List<Mbean> m2r = getMBeans2Register();
        cmr.registerMBeans(m2r);