FileDocCategorySizeDatePackage
HealthCheckerConfigFactory.javaAPI DocGlassfish v2 API5743Fri May 04 22:23:18 BST 2007com.sun.enterprise.management.config

HealthCheckerConfigFactory

public final class HealthCheckerConfigFactory extends ConfigFactory

Fields Summary
private final Set
LEGAL_OPTIONAL_KEYS
Constructors Summary
public HealthCheckerConfigFactory(ConfigFactoryCallback callbacks)

        super( callbacks );
    
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String url, java.lang.String intervalInSeconds, java.lang.String timeoutInSeconds)

        Map<String,String> optional = new HashMap<String,String>();
        optional.put(URL_KEY, url);
        optional.put(INTERVAL_IN_SECONDS_KEY, intervalInSeconds);
        optional.put(TIMEOUT_IN_SECONDS_KEY, timeoutInSeconds);

        final Map<String,String> params = initParams(optional);
        final ObjectName amxName = createChild(params);
        return amxName;
    
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs)

        final String containerName = getFactoryContainer().getName();
        if (getFactoryContainer().getJ2EEType().equals(CLUSTER_REF_CONFIG)) {
            return getOldConfigProxies().getOldClusterRefMBean(
                containerName, getProps()).createHealthChecker(translatedAttrs);
        } else if (getFactoryContainer().getJ2EEType().equals(SERVER_REF_CONFIG)) {
            return getOldConfigProxies().getOldServerRefMBean(
                containerName, getProps() ).createHealthChecker(translatedAttrs);
        }
        return null;
    
protected java.util.SetgetLegalOptionalCreateKeys()


        
        return(LEGAL_OPTIONAL_KEYS);
    
private java.lang.StringgetProps()

        final ObjectName objectName = Util.getExtra( getFactoryContainer() ).getObjectName();
        final String lbConfigName = objectName.getKeyProperty( XTypes.LB_CONFIG); //"lb-config" );
        final String clusterName  = objectName.getKeyProperty( XTypes.CLUSTER_CONFIG );

        String props = null;
        if ( lbConfigName != null ) {
            props = Util.makeProp( "lb-config", lbConfigName );
        }
        else if ( clusterName != null ) {
            props = Util.makeProp( "cluster", clusterName );
        }
        else {
            throw new IllegalArgumentException( JMXUtil.toString(objectName) );
        }
        return props;
    
public voidremove(java.lang.String name)

        final String containerName = getFactoryContainer().getName();
        if (getFactoryContainer().getJ2EEType().equals(CLUSTER_REF_CONFIG)) {
            getOldConfigProxies().getOldClusterRefMBean(containerName, getProps()).removeHealthChecker();
        } else if (getFactoryContainer().getJ2EEType().equals(SERVER_REF_CONFIG)) {
            getOldConfigProxies().getOldServerRefMBean(containerName, getProps() ).removeHealthChecker();
        }