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() |
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 String |
getAction() |
protected ConfigurationElement |
getConfiguration() |
protected org.codehaus.cargo.container.Container |
getContainer() |
protected Class |
getContainerClass() |
protected String |
getContainerId() |
protected org.apache.tools.ant.types.Path |
getExtraClasspath() |
protected String |
getHome() |
protected String |
getId() |
protected File |
getLog() |
protected org.codehaus.cargo.util.log.Logger |
getLogger() |
protected org.codehaus.cargo.util.log.LogLevel |
getLogLevel() |
protected String |
getOutput() |
protected org.apache.tools.ant.types.Reference |
getRefid() |
protected org.apache.tools.ant.types.Path |
getSharedClasspath() |
protected Map |
getSystemProperties() |
protected long |
getTimeout() |
boolean |
getWait() |
protected ZipURLInstallerElement |
getZipURLInstaller() |
protected boolean |
isAppend() |
protected org.codehaus.cargo.container.Container |
makeContainer() |
void |
setAction(String action)
Sets the action to execute (either "start" or "stop").
|
void |
setAppend(boolean isAppend) |
void |
setClass(Class containerClass) |
void |
setContainerFactory(ContainerFactory containerFactory) |
void |
setContainerId(String containerId) |
void |
setHint(String hint)
Deprecated.
|
void |
setHome(String home)
Sets the home dir.
|
void |
setId(String id) |
void |
setLog(File log) |
void |
setLogLevel(String logLevel) |
void |
setOutput(String output) |
void |
setRefId(org.apache.tools.ant.types.Reference refid) |
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.
|
void |
setWait(boolean wait) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void setWait(boolean wait)
wait
- if true wait indefinitely after the container is started, if false return the
execution flow to the userpublic boolean getWait()
public final void setClass(Class containerClass)
containerClass
- the container implementation class to useprotected final Class getContainerClass()
setClass(Class)
public void setAction(String action)
action
- the action that will be executed by this taskpublic void setContainerId(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 setHint(String hint)
setType(ContainerType)
hint
- the container's type (e.g. "installed", "embedded" or "remote")public final void setHome(String home)
home
- home dir to set.public final void setId(String id)
id
- the Ant property name that will contain the container instance referencepublic final void setRefId(org.apache.tools.ant.types.Reference refid)
refid
- the Ant property name that contains an existing container instance referencepublic final ZipURLInstallerElement createZipURLInstaller()
ZipURLInstallerElement
elementpublic final ConfigurationElement createConfiguration()
ConfigurationElement
elementpublic final void setOutput(String output)
RunnableContainer.setOutput(String)
public final void setLog(File log)
LoggedObject.setLogger(Logger)
public void setLogLevel(String logLevel)
AbstractLogger.setLevel(org.codehaus.cargo.util.log.LogLevel)
public final 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 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.Task
Task.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 Map getSystemProperties()
addSysproperty(Environment.Variable)
protected final ZipURLInstallerElement getZipURLInstaller()
createZipURLInstaller()
protected final ConfigurationElement getConfiguration()
createConfiguration()
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 String getOutput()
setOutput(String)
protected final File getLog()
setLog(File)
protected org.codehaus.cargo.util.log.LogLevel getLogLevel()
setLogLevel(String)
protected final String getHome()
setHome(String)
protected final boolean isAppend()
setAppend(boolean)
protected final String getAction()
protected org.codehaus.cargo.container.Container makeContainer()
protected String getContainerId()
setContainerId(String)
protected String getId()
setId(String)
protected org.apache.tools.ant.types.Reference getRefid()
setRefId(Reference)
public void setContainerFactory(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-2013 Codehaus. All Rights Reserved.