org.apache.cactus.integration.ant.container
Interface Container

All Known Implementing Classes:
AbstractContainer, ContainerWrapper

public interface Container

Interface for classes that can be used as nested elements in the <containers> element of the <cactus> task.

Version:
$Id: Container.java,v 1.4.2.2 2003/10/23 18:20:43 vmassol Exp $
Author:
Christopher Lenz

Method Summary
 java.lang.String getName()
          Returns a displayable name of the container for logging purposes.
 int getPort()
          Returns the port to which the container should listen.
 long getStartUpWait()
           
 org.apache.tools.ant.types.Environment.Variable[] getSystemProperties()
           
 java.io.File getToDir()
          Returns the value of the 'todir' attribute.
 void init()
          Subclasses should implement this method to perform any initialization that may be necessary.
 boolean isEnabled()
          Returns whether the container element is enabled, which is determined by the evaluation of the if- and unless conditions
 boolean isExcluded(java.lang.String theTestName)
          Returns whether a specific test case is to be excluded from being run in the container.
 void setAntTaskFactory(AntTaskFactory theFactory)
          Sets the factory to use for creating Ant tasks.
 void setDeployableFile(DeployableFile theDeployableFile)
          Sets the file that should be deployed to the container.
 void setLog(org.apache.commons.logging.Log theLog)
          Sets the log which the implementation should use.
 void setSystemProperties(org.apache.tools.ant.types.Environment.Variable[] theProperties)
          Sets the system properties that will be passed to the JVM in which the server will execute.
 void shutDown()
          Subclasses must implement this method to perform the actual task of shutting down the container.
 void startUp()
          Subclasses must implement this method to perform the actual task of starting up the container.
 

Method Detail

getName

public java.lang.String getName()
Returns a displayable name of the container for logging purposes.

Returns:
The container name

getPort

public int getPort()
Returns the port to which the container should listen.

Returns:
The port

getStartUpWait

public long getStartUpWait()
Returns:
the time to wait after the container has been started up.

getToDir

public java.io.File getToDir()
Returns the value of the 'todir' attribute.

Returns:
The output directory

getSystemProperties

public org.apache.tools.ant.types.Environment.Variable[] getSystemProperties()
Returns:
the list of system properties that will be set in the container JVM

init

public void init()
Subclasses should implement this method to perform any initialization that may be necessary. This method is called before any of the accessors or the methods startUp() and shutDown() are called, but after all attributes have been set.


isEnabled

public boolean isEnabled()
Returns whether the container element is enabled, which is determined by the evaluation of the if- and unless conditions

Returns:
true if the container is enabled

isExcluded

public boolean isExcluded(java.lang.String theTestName)
Returns whether a specific test case is to be excluded from being run in the container.

Parameters:
theTestName - The fully qualified name of the test fixture class
Returns:
true if the test should be excluded, otherwise false

setAntTaskFactory

public void setAntTaskFactory(AntTaskFactory theFactory)
Sets the factory to use for creating Ant tasks.

Parameters:
theFactory - The factory to use for creating Ant tasks

setLog

public void setLog(org.apache.commons.logging.Log theLog)
Sets the log which the implementation should use.

Parameters:
theLog - The log to set

setDeployableFile

public void setDeployableFile(DeployableFile theDeployableFile)
Sets the file that should be deployed to the container. This can be either a WAR or an EAR file, depending on the capabilities of the container.

Parameters:
theDeployableFile - The file to deploy

setSystemProperties

public void setSystemProperties(org.apache.tools.ant.types.Environment.Variable[] theProperties)
Sets the system properties that will be passed to the JVM in which the server will execute.

Parameters:
theProperties - the list of system properties to set in the container JVM

startUp

public void startUp()
Subclasses must implement this method to perform the actual task of starting up the container.


shutDown

public void shutDown()
Subclasses must implement this method to perform the actual task of shutting down the container.



Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.