org.apache.cactus.integration.ant.container
Class ContainerWrapper

java.lang.Object
  extended byorg.apache.cactus.integration.ant.container.ContainerWrapper
All Implemented Interfaces:
Container

public class ContainerWrapper
extends java.lang.Object
implements Container

Class that wraps around an implementation of the Container interface and delegates all calls to the wrapped instance.

Version:
$Id: ContainerWrapper.java,v 1.5 2003/05/14 18:20:07 vmassol Exp $
Author:
Christopher Lenz

Constructor Summary
ContainerWrapper(Container theContainer)
          Constructor.
 
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.
 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(java.io.File theWarFile)
          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 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerWrapper

public ContainerWrapper(Container theContainer)
Constructor.

Parameters:
theContainer - The container to wrap
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Container
Returns a displayable name of the container for logging purposes.

Specified by:
getName in interface Container
Returns:
The container name
See Also:
Container.getName()

getPort

public int getPort()
Description copied from interface: Container
Returns the port to which the container should listen.

Specified by:
getPort in interface Container
Returns:
The port
See Also:
Container.getPort()

getToDir

public java.io.File getToDir()
Description copied from interface: Container
Returns the value of the 'todir' attribute.

Specified by:
getToDir in interface Container
Returns:
The output directory
See Also:
Container.getToDir()

init

public void init()
Description copied from interface: Container
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 Container.startUp() and Container.shutDown() are called, but after all attributes have been set.

Specified by:
init in interface Container
See Also:
Container.init()

isEnabled

public boolean isEnabled()
Description copied from interface: Container
Returns whether the container element is enabled, which is determined by the evaluation of the if- and unless conditions

Specified by:
isEnabled in interface Container
Returns:
true if the container is enabled
See Also:
Container.isEnabled()

isExcluded

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

Specified by:
isExcluded in interface Container
Parameters:
theTestName - The fully qualified name of the test fixture class
Returns:
true if the test should be excluded, otherwise false
See Also:
Container.isExcluded(java.lang.String)

startUp

public void startUp()
Description copied from interface: Container
Subclasses must implement this method to perform the actual task of starting up the container.

Specified by:
startUp in interface Container
See Also:
Container.startUp()

shutDown

public void shutDown()
Description copied from interface: Container
Subclasses must implement this method to perform the actual task of shutting down the container.

Specified by:
shutDown in interface Container
See Also:
Container.shutDown()

setAntTaskFactory

public void setAntTaskFactory(AntTaskFactory theFactory)
Description copied from interface: Container
Sets the factory to use for creating Ant tasks.

Specified by:
setAntTaskFactory in interface Container
Parameters:
theFactory - The factory to use for creating Ant tasks
See Also:
Container.setAntTaskFactory(org.apache.cactus.integration.ant.util.AntTaskFactory)

setLog

public void setLog(org.apache.commons.logging.Log theLog)
Description copied from interface: Container
Sets the log which the implementation should use.

Specified by:
setLog in interface Container
Parameters:
theLog - The log to set
See Also:
Container.setLog(org.apache.commons.logging.Log)

setDeployableFile

public void setDeployableFile(java.io.File theWarFile)
Description copied from interface: Container
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.

Specified by:
setDeployableFile in interface Container
Parameters:
theWarFile - The file to deploy
See Also:
Container.setDeployableFile(java.io.File)


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