org.ow2.jonas.ant
Class ServerDeploy

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.ow2.jonas.ant.ServerDeploy
Direct Known Subclasses:
ServerDeploy

public class ServerDeploy
extends org.apache.tools.ant.Task

Controls hot deployment tools for J2EE servers. This class is used as a framework for the creation of vendor specific hot deployment tools.

See Also:
HotDeploymentTool, AbstractHotDeploymentTool, GenericHotDeploymentTool, WebLogicHotDeploymentTool

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ServerDeploy()
           
 
Method Summary
 void addGeneric(org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool tool)
          Creates a generic deployment tool.
 void addJonas(JonasHotDeploymentTool tool)
          Creates a JOnAS deployment tool, for deployment to JOnAS servers.
 void addWeblogic(org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool tool)
          Creates a WebLogic deployment tool, for deployment to WebLogic servers.
 void execute()
          Execute the task.
 String getAction()
          Returns the action field.
 File getSource()
          Returns the source field (the path/filename of the component to be deployed.
 void setAction(String action)
          The action to be performed, usually "deploy"; required.
 void setSource(File source)
          The filename of the component to be deployed; optional depending upon the tool and the action.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerDeploy

public ServerDeploy()
Method Detail

addGeneric

public void addGeneric(org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool tool)
Creates a generic deployment tool.

Ant calls this method on creation to handle embedded "generic" elements in the ServerDeploy task.

Parameters:
tool - An instance of GenericHotDeployment tool, passed in by Ant.

addWeblogic

public void addWeblogic(org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool tool)
Creates a WebLogic deployment tool, for deployment to WebLogic servers.

Ant calls this method on creation to handle embedded "weblogic" elements in the ServerDeploy task.

Parameters:
tool - An instance of WebLogicHotDeployment tool, passed in by Ant.

addJonas

public void addJonas(JonasHotDeploymentTool tool)
Creates a JOnAS deployment tool, for deployment to JOnAS servers.

Ant calls this method on creation to handle embedded "jonas" elements in the ServerDeploy task.

Parameters:
tool - An instance of JonasHotDeployment tool, passed in by Ant.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute the task.

This method calls the deploy() method on each of the vendor-specific tools in the vendorTools collection. This performs the actual process of deployment on each tool.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if the attributes are invalid or incomplete, or a failure occurs in the deployment process.

getAction

public String getAction()
Returns the action field.

Returns:
A string representing the "action" attribute.

setAction

public void setAction(String action)
The action to be performed, usually "deploy"; required. Some tools support additional actions, such as "delete", "list", "undeploy", "update"...

Parameters:
action - A String representing the "action" attribute.

getSource

public File getSource()
Returns the source field (the path/filename of the component to be deployed.

Returns:
A File object representing the "source" attribute.

setSource

public void setSource(File source)
The filename of the component to be deployed; optional depending upon the tool and the action.

Parameters:
source - String representing the "source" attribute.


Copyright © 2010 OW2 Consortium. All Rights Reserved.