org.apache.cactus.integration.ant
Class ContainerSet

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.types.DataType
          extended byorg.apache.cactus.integration.ant.ContainerSet
All Implemented Interfaces:
org.apache.tools.ant.DynamicConfigurator

public class ContainerSet
extends org.apache.tools.ant.types.DataType
implements org.apache.tools.ant.DynamicConfigurator

Ant data type that represents a set of J2EE containers.

Version:
$Id: ContainerSet.java,v 1.2 2003/06/11 16:19:26 cmlenz Exp $
Author:
Christopher Lenz

Constructor Summary
ContainerSet()
           
 
Method Summary
 void addGeneric(GenericContainer theContainer)
          Adds a nested generic container to the set of containers.
 java.lang.Object createDynamicElement(java.lang.String theName)
           
 Container[] getContainers()
          Returns an iterator over the nested container elements, in the order they appear in the build file.
 int getProxyPort()
          Returns the proxy port, or -1 if no proxy port has been set.
 long getTimeout()
          Returns the timeout after which connecting to a container will be given up, or -1 if no timeout has been set.
 void setDynamicAttribute(java.lang.String theName, java.lang.String theValue)
           
 void setProxyPort(int theProxyPort)
          Sets the proxy port which will be used by the test caller instead of the real container port.
 void setTimeout(long theTimeout)
          Sets the timeout after which connecting to a container will be given up.
 
Methods inherited from class org.apache.tools.ant.types.DataType
getDescription, isReference, setDescription, setRefid
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerSet

public ContainerSet()
Method Detail

createDynamicElement

public final java.lang.Object createDynamicElement(java.lang.String theName)
                                            throws org.apache.tools.ant.BuildException
Specified by:
createDynamicElement in interface org.apache.tools.ant.DynamicConfigurator
Throws:
org.apache.tools.ant.BuildException
See Also:
DynamicConfigurator.createDynamicElement(java.lang.String)

setDynamicAttribute

public final void setDynamicAttribute(java.lang.String theName,
                                      java.lang.String theValue)
                               throws org.apache.tools.ant.BuildException
Specified by:
setDynamicAttribute in interface org.apache.tools.ant.DynamicConfigurator
Throws:
org.apache.tools.ant.BuildException
See Also:
DynamicConfigurator.setDynamicAttribute(java.lang.String, java.lang.String)

addGeneric

public final void addGeneric(GenericContainer theContainer)
Adds a nested generic container to the set of containers.

Parameters:
theContainer - The generic container element to add

getContainers

public final Container[] getContainers()
Returns an iterator over the nested container elements, in the order they appear in the build file.

Returns:
An iterator over the nested container elements

getTimeout

public final long getTimeout()
Returns the timeout after which connecting to a container will be given up, or -1 if no timeout has been set.

Returns:
The timeout in milliseconds

setTimeout

public final void setTimeout(long theTimeout)
Sets the timeout after which connecting to a container will be given up.

Parameters:
theTimeout - The timeout in milliseconds

getProxyPort

public final int getProxyPort()
Returns the proxy port, or -1 if no proxy port has been set.

Returns:
The proxy port

setProxyPort

public final void setProxyPort(int theProxyPort)
Sets the proxy port which will be used by the test caller instead of the real container port. This can be used to insert protocol tracers between the test caller and the container.

Parameters:
theProxyPort - The proxy port to set


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