ModuleDeployEventpublic class ModuleDeployEvent extends com.sun.enterprise.admin.event.BaseDeployEvent Module deployment event. This event is generated whenever a J2EE
module is deployed, undeployed, redeployed, enabled or disabled. |
Fields Summary |
---|
public static final String | TYPE_WEBMODULEConstant to denote standalone web module | public static final String | TYPE_EJBMODULEConstant to denote standalone ejb module | public static final String | TYPE_CONNECTORConstant to denote connector module | public static final String | TYPE_APPCLIENTConstant to denote appclient module | public static final int | TYPE_WEBMODULE_CODEInt constant to denote standalone web module | public static final int | TYPE_EJBMODULE_CODEInt constant to denote standalone ejb module | public static final int | TYPE_CONNECTOR_CODEInt constant to denote connector module | public static final int | TYPE_APPCLIENT_CODEInt constant to denote appclient module | static final String | eventTypeEvent type | private String | moduleTypeModule type. | private int | moduleTypeCodeModule type code. | private boolean | forceDeployIndicates whether the ModuleDeployEvent was forced | private static com.sun.enterprise.util.i18n.StringManager | localStrings |
Constructors Summary |
---|
public ModuleDeployEvent(String instance, String moduleName, String moduleType, String actionCode)Create a new ModuleDeployEvent for the specified instance,
module (name and type) and action code.
super(eventType, instance, BaseDeployEvent.MODULE, moduleName, actionCode);
setModuleType(moduleType);
| public ModuleDeployEvent(String instance, String moduleName, String moduleType, String actionCode, boolean cascade)Creates a new ModuleDeployEvent for the provided instance,
moduleName, moduleType, actionCode and cascade
super(eventType, instance, BaseDeployEvent.MODULE, moduleName, actionCode, cascade);
setModuleType(moduleType);
| public ModuleDeployEvent(String instance, String moduleName, String moduleType, String actionCode, boolean cascade, boolean forceDeploy)Creates a new ModuleDeployEvent for the provided instance,
moduleName, moduleType, actionCode, cascade and
forceDeploy values
super(eventType, instance, BaseDeployEvent.MODULE, moduleName, actionCode, cascade);
setModuleType(moduleType);
setForceDeploy(forceDeploy);
|
Methods Summary |
---|
public boolean | getForceDeploy()
return this.forceDeploy;
| public java.lang.String | getModuleName()Get name of the module that was affected by deployment action.
return getJ2EEComponentName();
| public java.lang.String | getModuleType()Get type of the module. Possible values are TYPE_WEBMODULE,
TYPE_EJBMODULE and TYPE_CONNECTOR.
return moduleType;
| public int | getModuleTypeCode()Get module type code. Possible values are TYPE_WEBMODULE_CODE,
TYPE_EJBMODULE_CODE and TYPE_CONNECTOR_CODE.
return moduleTypeCode;
| public void | setForceDeploy(boolean forceDeploy)
this.forceDeploy = forceDeploy;
| private void | setModuleType(java.lang.String modType)Helper method to validate and set module type
boolean valid = true;
int modTypeCode = 0;
if (TYPE_WEBMODULE.equals(modType)) {
modTypeCode = TYPE_WEBMODULE_CODE;
} else if (TYPE_EJBMODULE.equals(modType)) {
modTypeCode = TYPE_EJBMODULE_CODE;
} else if (TYPE_CONNECTOR.equals(modType)) {
modTypeCode = TYPE_CONNECTOR_CODE;
} else if (TYPE_APPCLIENT.equals(modType)) {
modTypeCode = TYPE_APPCLIENT_CODE;
} else {
valid = false;
}
if (!valid) {
String msg = localStrings.getString( "admin.event.invalid_module_type", modType );
throw new IllegalArgumentException( msg );
}
this.moduleType = modType;
this.moduleTypeCode = modTypeCode;
| public java.lang.String | toString()Return a useful string representation.
return "ModuleDeployEvent -- " + getAction() + " " + moduleType + "/" + getModuleName();
|
|