Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 239130 2005-01-29 15:49:18Z vmassol $

Method Summary
`java.lang.String` | `getBaseURL()`
`org.apache.tools.ant.types.Path` | `getContainerClasspath()`
`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.lang.String` | `getProtocol()` Returns the protocol, that should be used for communication to the container.
`java.lang.String` | `getServer()` Returns the server (name or IP) to where the container is living.
`long` | `getStartUpWait()`
`org.apache.tools.ant.types.Environment.Variable[]` | `getSystemProperties()`
`java.lang.String` | `getTestContext()`
`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` | `setContainerClasspath(org.apache.tools.ant.types.Path theClasspath)` Sets additional classpath entries that will be added to the container classpath used to start the containers.
`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

### getTestContext

    public java.lang.String getTestContext()

  Returns:
    the context that the webapp will load on, null if the client should determine on it's own

### 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

### setContainerClasspath

    public void setContainerClasspath(org.apache.tools.ant.types.Path theClasspath)

  Sets additional classpath entries that will be added to the container classpath used to start the containers.

  Parameters:
    `theClasspath` - the container classpath entries to add
  Since:
    Cactus 1.6

### getContainerClasspath

    public org.apache.tools.ant.types.Path getContainerClasspath()

  Returns:
    additional container classpath entries
  Since:
    Cactus 1.6

### 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.

### getServer

    public java.lang.String getServer()

  Returns the server (name or IP) to where the container is living.

  Returns:
    The server

### getProtocol

    public java.lang.String getProtocol()

  Returns the protocol, that should be used for communication to the container.

  Returns:
    The protocol

### getBaseURL

    public java.lang.String getBaseURL()

  Returns:
    the base URL of the container, including protocol, name and port

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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