Class AbstractHotDeploymentTool
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
 
- 
- All Implemented Interfaces:
- HotDeploymentTool
 - Direct Known Subclasses:
- GenericHotDeploymentTool,- WebLogicHotDeploymentTool
 
 public abstract class AbstractHotDeploymentTool extends java.lang.Object implements HotDeploymentTool Abstract class to support vendor-specific hot deployment tools. This class will validate boilerplate attributes. Subclassing this class for a vendor specific tool involves the following.- Implement the isActionValid()method to insure the action supplied as the "action" attribute of ServerDeploy is valid.
- Implement the validateAttributes()method to insure all required attributes are supplied, and are in the correct format.
- Add a add<TOOL>method to the ServerDeploy class. This method will be called when Ant encounters aadd<TOOL>task nested in theserverdeploytask.
- Define the deploymethod. This method should perform whatever task it takes to hot-deploy the component. IE: spawn a JVM and run class, exec a native executable, run Java code...
 - See Also:
- HotDeploymentTool,- ServerDeploy
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentToolACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractHotDeploymentTool()
 - 
Method SummaryModifier and Type Method Description PathcreateClasspath()Add a classpath as a nested element.PathgetClasspath()gets the classpath field.java.lang.StringgetPassword()Returns the password field.java.lang.StringgetServer()Returns the server field.protected ServerDeploygetTask()Returns the task field, a ServerDeploy object.java.lang.StringgetUserName()Returns the userName field.protected abstract booleanisActionValid()Determines if the "action" attribute defines a valid action.voidsetClasspath(Path classpath)The classpath to be passed to the JVM running the tool; optional depending upon the tool.voidsetPassword(java.lang.String password)The password of the user; optional.voidsetServer(java.lang.String server)The address or URL for the server where the component will be deployed.voidsetTask(ServerDeploy task)Sets the parent task.voidsetUserName(java.lang.String userName)The user with privileges to deploy applications to the server; optional.voidvalidateAttributes()Validates the passed in attributes.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTooldeploy
 
- 
 
- 
- 
- 
Method Detail- 
createClasspathpublic Path createClasspath() Add a classpath as a nested element.- Returns:
- A Path object representing the classpath to be used.
 
 - 
isActionValidprotected abstract boolean isActionValid() Determines if the "action" attribute defines a valid action.Subclasses should determine if the action passed in is supported by the vendor's deployment tool. Actions may by "deploy", "delete", etc... It all depends on the tool. - Returns:
- true if the "action" attribute is valid, false if not.
 
 - 
validateAttributespublic void validateAttributes() throws BuildExceptionValidates the passed in attributes. Subclasses should chain to this super-method to insure validation of boilerplate attributes.Only the "action" attribute is required in the base class. Subclasses should check attributes accordingly. - Specified by:
- validateAttributesin interface- HotDeploymentTool
- Throws:
- BuildException- if the attributes are invalid or incomplete.
 
 - 
setTaskpublic void setTask(ServerDeploy task) Sets the parent task.- Specified by:
- setTaskin interface- HotDeploymentTool
- Parameters:
- task- a ServerDeploy object representing the parent task.
 
 - 
getTaskprotected ServerDeploy getTask() Returns the task field, a ServerDeploy object.- Returns:
- An ServerDeploy representing the parent task.
 
 - 
getClasspathpublic Path getClasspath() gets the classpath field.- Returns:
- A Path representing the "classpath" attribute.
 
 - 
setClasspathpublic void setClasspath(Path classpath) The classpath to be passed to the JVM running the tool; optional depending upon the tool. The classpath may also be supplied as a nested element.- Parameters:
- classpath- A Path object representing the "classpath" attribute.
 
 - 
getUserNamepublic java.lang.String getUserName() Returns the userName field.- Returns:
- A String representing the "userName" attribute.
 
 - 
setUserNamepublic void setUserName(java.lang.String userName) The user with privileges to deploy applications to the server; optional.- Parameters:
- userName- A String representing the "userName" attribute.
 
 - 
getPasswordpublic java.lang.String getPassword() Returns the password field.- Returns:
- A String representing the "password" attribute.
 
 - 
setPasswordpublic void setPassword(java.lang.String password) The password of the user; optional.- Parameters:
- password- A String representing the "password" attribute.
 
 - 
getServerpublic java.lang.String getServer() Returns the server field.- Returns:
- A String representing the "server" attribute.
 
 - 
setServerpublic void setServer(java.lang.String server) The address or URL for the server where the component will be deployed.- Parameters:
- server- A String representing the "server" attribute.
 
 
- 
 
-