public class CargoTask
extends org.apache.tools.ant.Task
Container interface (either
the implementations provided by Cargo or your own ones).| Constructor and Description |
|---|
CargoTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable property)
Called by Ant when the Variable object has been properly initialized.
|
void |
addConfiguredSyspropertyset(PropertySet propertySet)
Adds a set of properties that will be used as system properties in the executing container
VM.
|
void |
addSysproperty(org.apache.tools.ant.types.Environment.Variable property)
Adds a system property that will be set up in the executing container VM.
|
ConfigurationElement |
createConfiguration() |
DaemonElement |
createDaemon() |
org.apache.tools.ant.types.Path |
createExtraClasspath()
Adds extra classpath that will be used for starting the container.
|
org.apache.tools.ant.types.Path |
createSharedClasspath()
Adds shared classpath that will be shared by container applications.
|
ZipURLInstallerElement |
createZipURLInstaller() |
void |
execute() |
protected void |
executeActions()
Execute the action specified by the user.
|
protected java.lang.String |
getAction() |
protected ConfigurationElement |
getConfiguration() |
protected org.codehaus.cargo.container.Container |
getContainer() |
protected java.lang.Class |
getContainerClass() |
protected java.lang.String |
getContainerId() |
protected DaemonElement |
getDaemon() |
protected org.apache.tools.ant.types.Path |
getExtraClasspath() |
protected java.lang.String |
getHome() |
protected java.lang.String |
getId() |
protected java.io.File |
getLog() |
protected org.codehaus.cargo.util.log.Logger |
getLogger() |
protected org.codehaus.cargo.util.log.LogLevel |
getLogLevel() |
protected java.lang.String |
getOutput() |
protected org.apache.tools.ant.types.Reference |
getRefid() |
protected org.apache.tools.ant.types.Path |
getSharedClasspath() |
protected java.util.Map<java.lang.String,java.lang.String> |
getSystemProperties() |
protected java.io.File |
getSystemPropertiesFile() |
protected long |
getTimeout() |
protected ZipURLInstallerElement |
getZipURLInstaller() |
protected boolean |
isAppend() |
protected org.codehaus.cargo.container.Container |
makeContainer() |
void |
setAction(java.lang.String action)
Sets the action to execute ("start", "stop", etc.).
|
void |
setAppend(boolean isAppend) |
void |
setClass(java.lang.Class containerClass) |
void |
setContainerFactory(org.codehaus.cargo.generic.ContainerFactory containerFactory) |
void |
setContainerId(java.lang.String containerId) |
void |
setHome(java.lang.String home)
Sets the home dir.
|
void |
setId(java.lang.String id) |
void |
setLog(java.io.File log) |
void |
setLogLevel(java.lang.String logLevel) |
void |
setOutput(java.lang.String output) |
void |
setRefId(org.apache.tools.ant.types.Reference refid) |
void |
setSystemPropertiesFile(java.io.File systemPropertiesFile) |
void |
setTimeout(long timeout) |
void |
setType(org.codehaus.cargo.container.ContainerType type) |
protected void |
setupExtraClasspath()
Set up extra classpaths if defined.
|
protected void |
setupHome()
Set up a home dir (possibly using a ZipURLInstaller).
|
protected void |
setupLogger()
Set up a logger for the container.
|
protected void |
setupOutput()
Set up an output file containing container's console output if defined.
|
protected void |
setupSharedClasspath()
Set up shared classpath if defined.
|
protected void |
setupSystemProperties()
Set up system properties if defined.
|
protected void |
setupTimeout()
Set up a timeout if defined.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setClass(java.lang.Class containerClass)
containerClass - the container implementation class to useprotected final java.lang.Class getContainerClass()
setClass(Class)public void setAction(java.lang.String action)
action - the action that will be executed by this taskpublic void setContainerId(java.lang.String containerId)
containerId - the container idpublic void setType(org.codehaus.cargo.container.ContainerType type)
type - the container's type (e.g. "installed", "embedded" or "remote")public void setHome(java.lang.String home)
home - home dir to set.public void setId(java.lang.String id)
id - the Ant property name that will contain the container instance referencepublic void setRefId(org.apache.tools.ant.types.Reference refid)
refid - the Ant property name that contains an existing container instance referencepublic ZipURLInstallerElement createZipURLInstaller()
ZipURLInstallerElement elementpublic ConfigurationElement createConfiguration()
ConfigurationElement elementpublic DaemonElement createDaemon()
DaemonElement elementpublic void setOutput(java.lang.String output)
RunnableContainer.setOutput(String)public void setLog(java.io.File log)
LoggedObject.setLogger(Logger)public void setLogLevel(java.lang.String logLevel)
AbstractLogger.setLevel(org.codehaus.cargo.util.log.LogLevel)public void setAppend(boolean isAppend)
RunnableContainer.setAppend(boolean)public void setTimeout(long timeout)
RunnableContainer.setTimeout(long)public org.apache.tools.ant.types.Path createExtraClasspath()
public org.apache.tools.ant.types.Path createSharedClasspath()
public void addSysproperty(org.apache.tools.ant.types.Environment.Variable property)
property - the system property to addpublic void setSystemPropertiesFile(java.io.File systemPropertiesFile)
systemPropertiesFile - System properties loaded from file.public void addConfiguredSyspropertyset(PropertySet propertySet)
propertySet - Ant element defining the property setpublic void addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable property)
property - the system property to setpublic void execute()
execute in class org.apache.tools.ant.TaskTask.execute()protected void executeActions()
protected void setupLogger()
protected void setupOutput()
protected void setupTimeout()
protected void setupHome()
protected void setupExtraClasspath()
protected void setupSharedClasspath()
protected void setupSystemProperties()
protected final java.util.Map<java.lang.String,java.lang.String> getSystemProperties()
addSysproperty(Environment.Variable)protected java.io.File getSystemPropertiesFile()
protected final ZipURLInstallerElement getZipURLInstaller()
createZipURLInstaller()protected final ConfigurationElement getConfiguration()
createConfiguration()protected final DaemonElement getDaemon()
createDaemon()protected final org.apache.tools.ant.types.Path getExtraClasspath()
createExtraClasspath()protected final org.apache.tools.ant.types.Path getSharedClasspath()
createSharedClasspath()protected final long getTimeout()
getTimeout()protected final java.lang.String getOutput()
setOutput(String)protected final java.io.File getLog()
setLog(File)protected org.codehaus.cargo.util.log.LogLevel getLogLevel()
setLogLevel(String)protected final java.lang.String getHome()
setHome(String)protected final boolean isAppend()
setAppend(boolean)protected final java.lang.String getAction()
protected org.codehaus.cargo.container.Container makeContainer()
protected java.lang.String getContainerId()
setContainerId(String)protected java.lang.String getId()
setId(String)protected org.apache.tools.ant.types.Reference getRefid()
setRefId(Reference)public void setContainerFactory(org.codehaus.cargo.generic.ContainerFactory containerFactory)
containerFactory - the new container factory to useprotected org.codehaus.cargo.container.Container getContainer()
execute()protected org.codehaus.cargo.util.log.Logger getLogger()
Copyright © 2004-2014 Codehaus. All Rights Reserved.