abstractpublic class AbstractContainer extends ProjectComponent implements Container(Code)
Abstract base class for supporting specific containers as nested elements in
the
org.apache.cactus.integration.ant.CactusTask .
version: $Id: AbstractContainer.java 239130 2005-01-29 15:49:18Z vmassol $
createDirectory(File theParentDir, String theName) Convenience method for creating a new directory inside another one.
final public PatternSet.NameEntry
createExclude() Creates a nested exclude element that is added to the pattern set.
final protected FilterChain
createFilterChain() Creates the default filter chain that should be applied while copying
container configuration files to the temporary directory from which the
container is started.
setServer(String theServer) Sets the server (name or ip) to which the container is living.
public void
setStartUpWait(long theStartUpWait) Sets the time to wait after the container has been started up.
The default time is 1 second.
Note: This is a hack while waiting for container specific solutions
that tell exactly when the server is started or not.
Convenience method for creating a new directory inside another one.
Parameters: theParentDir - The directory in which the new directory should becreated Parameters: theName - The name of the directory to create The new directory throws: IOException - If the directory could not be created
createExclude
final public PatternSet.NameEntry createExclude()(Code)
Creates a nested exclude element that is added to the pattern set.
The created exclude element
createFilterChain
final protected FilterChain createFilterChain()(Code)
Creates the default filter chain that should be applied while copying
container configuration files to the temporary directory from which the
container is started. The default filter chain replaces all occurences
of @cactus.port@ with the TCP port of the container, and all occurences
of @cactus.context@ with the web-application's context path (if the
deployable file is a web-app).
The default filter chain
final public void setIf(String theIfCondition)(Code)
Sets the name of a property that must exist in the project if tests are
to be run on the container.
Parameters: theIfCondition - The property name to set
final public void setProtocol(String theProtocol)(Code)
Sets the protocol the container should use
Parameters: theProtocol - The protocol to set
setServer
final public void setServer(String theServer)(Code)
Sets the server (name or ip) to which the container is living.
Parameters: theServer - The server to set
setStartUpWait
public void setStartUpWait(long theStartUpWait)(Code)
Sets the time to wait after the container has been started up.
The default time is 1 second.
Note: This is a hack while waiting for container specific solutions
that tell exactly when the server is started or not. ATM, the only known
issue is with JBoss, where the servlet engine is started before the full
JBoss is started and thus it may happen that we try to shutdown JBoss
before it has finished starting, leading to an exception.
Parameters: theStartUpWait - The time to wait in milliseconds
setSystemProperties
public void setSystemProperties(Variable[] theProperties)(Code)
Sets the directory to which the test reports should be written.
Parameters: theToDir - The output directory to set
setUnless
final public void setUnless(String theUnlessCondition)(Code)
Sets the name of a property that must not exist in the project if tests
are to be run on the container.
Parameters: theUnlessCondition - The property name to set
Convenience method that creates a temporary directory or
prepares the one passed by the user.
The temporary directory Parameters: theCustomTmpDir - The user specified custom dir or null if none hasbeen specified (ie we'll create default one). Parameters: theName - The name of the directory relative to the system specifictemporary directory