FileDocCategorySizeDatePackage
ServerRefConfigFactory.javaAPI DocGlassfish v2 API5255Fri May 04 22:23:20 BST 2007com.sun.enterprise.management.config

ServerRefConfigFactory

public final class ServerRefConfigFactory extends ConfigFactory

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

        super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String referencedServerName, java.util.Map optional)

		final String[] requiredParams = new String[] {};

		final Map<String,String> params =
		    initParams(referencedServerName,  requiredParams, optional);

		final ObjectName amxName = createNamedChild(referencedServerName, params );

		return( amxName );                
	
public javax.management.ObjectNamecreate(java.lang.String referencedServerName, java.lang.String disableTimeoutInMinutes, boolean lbEnabled, boolean enabled)

		final Map<String,String> optionalParams = new java.util.HashMap<String,String>();
		optionalParams.put( ServerRefConfigCR.DISABLE_TIMEOUT_IN_MINUTES_KEY,disableTimeoutInMinutes); 
		optionalParams.put( ServerRefConfigCR.LB_ENABLED_KEY,Boolean.toString(lbEnabled)); 
		optionalParams.put( ServerRefConfigCR.ENABLED_KEY,Boolean.toString(enabled)); 

		return create(referencedServerName, optionalParams);
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs)

		return getOldCreateRemoveServerRef().createServerRef(translatedAttrs);
	
protected java.util.SetgetLegalOptionalCreateKeys()


           
		return( LEGAL_OPTIONAL_KEYS );
	
private com.sun.enterprise.management.support.oldconfig.OldCreateRemoveServerRefgetOldCreateRemoveServerRef()

        final ServerRefConfigCR     fc  = (ServerRefConfigCR)getFactoryContainer();
        final String                name = Util.asAMX( fc ).getName();
        
        OldCreateRemoveServerRef    result  = null;
        if ( fc instanceof ClusterConfig )
        {
            result  = getOldConfigProxies().getOldClusterMBean( name );
        }
        else if ( fc instanceof LBConfig )
        {
            result  = getOldConfigProxies().getOldLbConfig( name );
        }
        
        return result;
    
protected java.util.MapgetParamNameOverrides()

		return( MapUtil.newMap( CONFIG_NAME_KEY, "ref" ) );
	
public voidremoveByName(java.lang.String referencedServerName)

		getOldCreateRemoveServerRef().removeServerRefByRef(referencedServerName);