BaseDeployEventpublic class BaseDeployEvent extends com.sun.enterprise.admin.event.AdminEvent implements CloneableBase deployment event. A deployment event is one of - deployed, undeployed,
redeployed, enabled or disabled on J2ee application, standalone J2EE
module or application server resource. The word deploy is used in two
meanings here - one to denote the group of actions that are related to
deployment and another to denote the specific action of initial deployment
of application, module or resource. |
Fields Summary |
---|
public static final String | APPLICATIONConstant denoting J2EE application. | public static final String | MODULEConstant denoting standalone J2EE module. | public static final String | RESOURCEConstant denoting application server resource. | public static final String | DEPLOYConstant denoting deployment action | public static final String | UNDEPLOYConstant denoting undeployment action | public static final String | REDEPLOYConstant denoting redeployment action | public static final String | ENABLEConstant denoting enable action | public static final String | DISABLEConstant denoting disable action | public static final String | ADD_REFERENCEConstant denoting add reference action | public static final String | REMOVE_REFERENCEConstant denoting remove reference action | public static final int | APPLICATION_DEPLOYEDApplication deploy event | public static final int | APPLICATION_UNDEPLOYEDApplication undeploy event | public static final int | APPLICATION_REDEPLOYEDApplication redeploy event | public static final int | MODULE_DEPLOYEDModule deploy event | public static final int | MODULE_UNDEPLOYEDModule undeploy event | public static final int | MODULE_REDEPLOYEDModule redeploy event | public static final int | MODULE_ENABLEModule enable event | public static final int | MODULE_DISABLEModule disable event | public static final int | APPLICATION_ENABLEApplication enable event | public static final int | APPLICATION_DISABLEApplication disable event | public static final int | APPLICATION_REFERENCEDApplication reference event | public static final int | APPLICATION_UNREFERENCED | static final String | eventTypeEvent type | protected String | j2eeComponentType | protected String | j2eeComponentName | protected String | actionName | protected boolean | cascade | private static com.sun.enterprise.util.i18n.StringManager | localStrings |
Constructors Summary |
---|
public BaseDeployEvent(String instance, String componentType, String componentName, String action)Create a new BaseDeployEvent.
this(eventType, instance, componentType, componentName, action);
| public BaseDeployEvent(String type, String instance, String componentType, String componentName, String action)Create a new BaseDeployEvent.
this(type, instance, componentType, componentName, action, false);
| public BaseDeployEvent(String type, String instance, String componentType, String componentName, String action, boolean cascade)
super(type, instance);
j2eeComponentType = componentType;
j2eeComponentName = componentName;
setAction(action);
setCascade(cascade);
| public BaseDeployEvent(String type, Object source, long seqNumber, long time)
super(type, source, seqNumber, time);
|
Methods Summary |
---|
public java.lang.Object | clone()
return super.clone();
| public java.lang.String | getAction()Get deployment action for this event.
return actionName;
| public boolean | getCascade()
return cascade;
| public java.lang.String | getJ2EEComponentName()Get name of the component on which this event happened. This is either
application name, module name or resource name.
return j2eeComponentName;
| public java.lang.String | getJ2EEComponentType()Get type of component on which this event happened.
return j2eeComponentType;
| protected void | setAction(java.lang.String action)Set action to specified value. If action is not one of DEPLOY, UNDEPLOY,
REDEPLOY, ENABLE or DISABLE then IllegalArgumentException is thrown.
boolean valid = false;
if (DEPLOY.equals(action) || UNDEPLOY.equals(action)
|| REDEPLOY.equals(action) || ENABLE.equals(action)
|| DISABLE.equals(action) || ADD_REFERENCE.equals(action)
|| REMOVE_REFERENCE.equals(action)) {
valid = true;
}
if (!valid) {
String msg = localStrings.getString( "admin.event.invalid_action", action );
throw new IllegalArgumentException( msg );
}
this.actionName = action;
| public void | setCascade(boolean cascade)
this.cascade = cascade;
|
|