public class GenericHotDeploymentTool extends AbstractHotDeploymentTool
The simple implementation spawns a JVM with the supplied class name, jvm args, and arguments.
HotDeploymentTool
,
AbstractHotDeploymentTool
,
ServerDeploy
ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE
Constructor and Description |
---|
GenericHotDeploymentTool() |
Modifier and Type | Method and Description |
---|---|
Commandline.Argument |
createArg()
Add a nested argument element to hand to the deployment tool; optional.
|
Commandline.Argument |
createJvmarg()
Add a nested argument element to hand to the JVM running the
deployment tool.
|
void |
deploy()
Perform the actual deployment.
|
java.lang.String |
getClassName()
Get the classname attribute.
|
Java |
getJava()
get the java attribute.
|
protected boolean |
isActionValid()
Determines if the "action" attribute defines a valid action.
|
void |
setClassName(java.lang.String className)
The name of the class to execute to perform
deployment; required.
|
void |
setTask(ServerDeploy task)
Sets the parent task.
|
void |
validateAttributes()
Validates the passed in attributes.
|
createClasspath, getClasspath, getPassword, getServer, getTask, getUserName, setClasspath, setPassword, setServer, setUserName
public Commandline.Argument createArg()
public Commandline.Argument createJvmarg()
protected boolean isActionValid()
Subclasses should determine if the action passed in is supported by the vendor's deployment tool. For this generic implementation, the only valid action is "deploy"
isActionValid
in class AbstractHotDeploymentTool
public void setTask(ServerDeploy task)
setTask
in interface HotDeploymentTool
setTask
in class AbstractHotDeploymentTool
task
- An ServerDeploy object representing the parent task.public void deploy() throws BuildException
deploy
in interface HotDeploymentTool
deploy
in class AbstractHotDeploymentTool
BuildException
- if the attributes are invalid or incomplete.public void validateAttributes() throws BuildException
validateAttributes
in interface HotDeploymentTool
validateAttributes
in class AbstractHotDeploymentTool
BuildException
- if the attributes are invalid or incomplete.public void setClassName(java.lang.String className)
className
- The fully qualified class name of the class
to perform deployment.public Java getJava()
public java.lang.String getClassName()