FileDocCategorySizeDatePackage
ActionConfigFactory.javaAPI DocGlassfish v2 API4033Fri May 04 22:23:16 BST 2007com.sun.enterprise.management.config

ActionConfigFactory

public final class ActionConfigFactory extends ConfigFactory

Fields Summary
Constructors Summary
public ActionConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String mbeanName)

        if ( mbeanName == null )
        {
            throw new IllegalArgumentException();
        }
            
	    final ManagementRuleConfig  ruleConfig  =
	        (ManagementRuleConfig)getFactoryContainer();
        
        ActionConfig actionConfig = ruleConfig.getActionConfig();
        if ( actionConfig != null )
        {
            throw new IllegalStateException( "action already exists as " +
                        actionConfig.getName() + ", " + actionConfig.getActionMBeanName());
        }
        
	    final String ruleName   = ruleConfig.getName();
        getOldManagementRules().addActionToManagementRule( ruleName, mbeanName );
	    
	    // wait till AMX version makes its appearance
        // This is clumsy, but unfortunately the MBean name is not returned by addActionToManagementRule()
	    while ( (actionConfig = ruleConfig.getActionConfig()) == null )
	    {
	        sleepMillis( 10 );
	    }
	    
	    final ObjectName    amxObjectName   = Util.getObjectName( actionConfig );
		getCallbacks().sendConfigCreatedNotification( amxObjectName );
		
	    return amxObjectName;
	
private com.sun.enterprise.management.support.oldconfig.OldManagementRulesgetOldManagementRules()

	    return getOldConfigProxies().getOldManagementRules( getConfigName() );
	
protected voidinternalRemove(javax.management.ObjectName objectName)

	    throw new RuntimeException( "not supported" );