FileDocCategorySizeDatePackage
DynamicReconfigEvent.javaAPI DocGlassfish v2 API3963Fri May 04 22:33:34 BST 2007com.sun.enterprise.admin.event

DynamicReconfigEvent

public class DynamicReconfigEvent extends com.sun.enterprise.admin.event.AdminEvent implements CommandEvent
DynamicReconfigEvent - emitted by DAS upon changes "dynamic-reconfiguration-enabled" attribute in "config" element

Fields Summary
public static final int
ACTION_DISABLED
Constant denoting action code
public static final int
ACTION_ENABLED
public static final String
eventType
Event type
private int
actionType
Attributes
private static com.sun.enterprise.util.i18n.StringManager
localStrings
Constructors Summary
public DynamicReconfigEvent(String instance, int action)
Create a new DynamicReconfigEvent.

param
instance name of the instance to which the event applies
param
action type of action - one of DynamicReconfigEvent.ACTION_ENABLED, DynamicReconfigEvent.ACTION_DISABLED
throws
IllegalArgumentException if specified action is not valid


                                                 
         
        super(eventType, instance);
        setAction(action);
    
Methods Summary
public intgetActionType()
Get action type for this event.

        return actionType;
    
private voidsetAction(int action)
Set action to specified value. If action is not one of allowed, then IllegalArgumentException is thrown.

throws
IllegalArgumentException if action is invalid

        boolean valid = false;
        if (action==ACTION_ENABLED      ||
            action==ACTION_DISABLED)
            valid = true;
        if (!valid) {
			String msg = localStrings.getString( "admin.event.invalid_action", ""+action );
            throw new IllegalArgumentException( msg );
        }
        this.actionType = action;