isActionValid() method to insure the
action supplied as the "action" attribute of ServerDeploy is valid.validateAttributes() method to insure
all required attributes are supplied, and are in the correct format.add<TOOL> method to the ServerDeploy
class. This method will be called when Ant encounters a
add<TOOL> task nested in the
serverdeploy task.deploy method. 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...org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool , org.apache.tools.ant.taskdefs.optional.j2ee.ServerDeploy
| Modifier and Type | Field and Description |
|---|---|
| private Path | classpath
The classpath passed to the JVM on execution. |
| private String | password
The password for the deployment server. |
| private String | server
The address of the deployment server |
| private ServerDeploy | task
The parent task |
| private String | userName
The username for the deployment server. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Path | Returns: A Path object representing the classpath to be used.Add a classpath as a nested element. |
| public Path | |
| public String | |
| public String | |
| protected ServerDeploy | Returns: An ServerDeploy representing the parent task.Returns the task field, a ServerDeploy object. |
| public String | |
| protected abstract boolean | Returns: true if the "action" attribute is valid, false if not.Determines if the "action" attribute defines a valid action. |
| public void | setClasspath(Path
A Path object representing the "classpath" attribute. classpath)The classpath to be passed to the JVM running the tool; optional depending upon the tool. |
| public void | setPassword(String
A String representing the "password" attribute. password)The password of the user; optional. |
| public void | |
| public void | setTask(ServerDeploy
a ServerDeploy object representing the parent task. task)Implements org. |
| public void | setUserName(String
A String representing the "userName" attribute. userName)The user with privileges to deploy applications to the server; optional. |
| public void | validateAttributes()
Implements org. |
| classpath | back to summary |
|---|---|
| private Path classpath The classpath passed to the JVM on execution. | |
| password | back to summary |
|---|---|
| private String password The password for the deployment server. | |
| server | back to summary |
|---|---|
| private String server The address of the deployment server | |
| task | back to summary |
|---|---|
| private ServerDeploy task The parent task | |
| userName | back to summary |
|---|---|
| private String userName The username for the deployment server. | |
| AbstractHotDeploymentTool | back to summary |
|---|---|
| public AbstractHotDeploymentTool() | |
| createClasspath | back to summary |
|---|---|
| public Path createClasspath() Add a classpath as a nested element.
| |
| getClasspath | back to summary |
|---|---|
| public Path getClasspath() gets the classpath field.
| |
| getPassword | back to summary |
|---|---|
| public String getPassword() Returns the password field.
| |
| getServer | back to summary |
|---|---|
| public String getServer() Returns the server field.
| |
| getTask | back to summary |
|---|---|
| protected ServerDeploy getTask() Returns the task field, a ServerDeploy object.
| |
| getUserName | back to summary |
|---|---|
| public String getUserName() Returns the userName field.
| |
| isActionValid | back to summary |
|---|---|
| protected 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.
| |
| setClasspath | back to summary |
|---|---|
| public 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.
| |
| setPassword | back to summary |
|---|---|
| public void setPassword(String password) The password of the user; optional.
| |
| setServer | back to summary |
|---|---|
| public void setServer(String server) The address or URL for the server where the component will be deployed.
| |
| setTask | back to summary |
|---|---|
| public void setTask(ServerDeploy task) Implements org. Sets the parent task.
| |
| setUserName | back to summary |
|---|---|
| public void setUserName(String userName) The user with privileges to deploy applications to the server; optional.
| |
| validateAttributes | back to summary |
|---|---|
| public void validateAttributes() throws BuildException Implements org. Validates 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.
| |