Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.j2ee

public Class ServerDeploy

extends Task
Class Inheritance
Imports
java.io.File, java.util.List, .Vector, org.apache.tools.ant.BuildException, .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
org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool, org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool, org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool, org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool

Field Summary

Modifier and TypeField and Description
private String
action

The action to be performed.

private File
source

The source (fully-qualified path) to the component being deployed

private List<AbstractHotDeploymentTool>
vendorTools

The vendor specific tool for deploying the component

Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addGeneric(GenericHotDeploymentTool
An instance of GenericHotDeployment tool, passed in by Ant.
tool
)

Creates a generic deployment tool.

public void
addJonas(JonasHotDeploymentTool
An instance of JonasHotDeployment tool, passed in by Ant.
tool
)

Creates a JOnAS deployment tool, for deployment to JOnAS servers.

public void
addWeblogic(WebLogicHotDeploymentTool
An instance of WebLogicHotDeployment tool, passed in by Ant.
tool
)

Creates a WebLogic deployment tool, for deployment to WebLogic servers.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Execute the task.
public String

Returns:

A string representing the "action" attribute.
getAction
()

Returns the action field.

public File

Returns:

A File object representing the "source" attribute.
getSource
()

Returns the source field (the path/filename of the component to be deployed.

public void
setAction(String
A String representing the "action" attribute.
action
)

The action to be performed, usually "deploy"; required.

public void
setSource(File
String representing the "source" attribute.
source
)

The filename of the component to be deployed; optional depending upon the tool and the action.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

actionback to summary
private String action

The action to be performed. IE: "deploy", "delete", etc...

sourceback to summary
private File source

The source (fully-qualified path) to the component being deployed

vendorToolsback to summary
private List<AbstractHotDeploymentTool> vendorTools

The vendor specific tool for deploying the component

Constructor Detail

ServerDeployback to summary
public ServerDeploy()

Method Detail

addGenericback to summary
public void addGeneric(GenericHotDeploymentTool tool)

Creates a generic deployment tool.

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

Parameters
tool:GenericHotDeploymentTool

An instance of GenericHotDeployment tool, passed in by Ant.

addJonasback to summary
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:JonasHotDeploymentTool

An instance of JonasHotDeployment tool, passed in by Ant.

addWeblogicback to summary
public void addWeblogic(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:WebLogicHotDeploymentTool

An instance of WebLogicHotDeployment tool, passed in by Ant.

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

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.

Annotations
@Override
Exceptions
BuildException:
if the attributes are invalid or incomplete, or a failure occurs in the deployment process.
getActionback to summary
public String getAction()

Returns the action field.

Returns:String

A string representing the "action" attribute.

getSourceback to summary
public File getSource()

Returns the source field (the path/filename of the component to be deployed.

Returns:File

A File object representing the "source" attribute.

setActionback to summary
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:String

A String representing the "action" attribute.

setSourceback to summary
public void setSource(File source)

The filename of the component to be deployed; optional depending upon the tool and the action.

Parameters
source:File

String representing the "source" attribute.