Methods Summary |
---|
protected void | checkConfiguration()
super.checkConfiguration();
if (action == null) {
String msg = "The action command must be specified.";
throw new BuildException(msg, getLocation());
}
if (!ACTION_MAP.containsKey(action)) {
String msg = "The action command (\"" + action + "\") is invalid.";
throw new BuildException(msg, getLocation());
}
|
protected void | checkConfiguration(Server aServer)
super.checkConfiguration(aServer);
if ((action.equals(ACTION_CREATE) || action.equals(ACTION_DESTROY)) &&
(aServer.getInstance() == null)) {
String msg = "When creating or destroying an application server "
+ "instance, the \"instance\" attribute is required.";
throw new BuildException(msg, getLocation());
}
|
protected void | execute(Server aServer)
if (action.equals(ACTION_RESTART)) {
execute(ACTION_STOP, aServer);
execute(ACTION_START, aServer);
} else {
execute(action, aServer);
}
|
private void | execute(java.lang.String anAction, Server aServer)
String cmdString = (String) ACTION_MAP.get(anAction);
cmdString +=aServer.getCommandParameters(false);
if (anAction.equals(ACTION_CREATE)) {
cmdString += " --instanceport " + aServer.getInstanceport();
}
if (aServer.getInstance() != null) {
cmdString += " " + aServer.getInstance();
}
execIasCommand(cmdString);
|
public void | setAction(java.lang.String action)
ACTION_MAP.put(ACTION_START, "start-instance");
ACTION_MAP.put(ACTION_STOP, "stop-instance");
ACTION_MAP.put(ACTION_RESTART, null);
ACTION_MAP.put(ACTION_CREATE, "create-instance");
ACTION_MAP.put(ACTION_DESTROY, "delete-instance");
this.action = action;
|