org.codehaus.cargo.generic
Interface ContainerFactory
- All Known Implementing Classes:
- DefaultContainerFactory
public interface ContainerFactory
Allow instantiating a container by id (e.g. "resin3x").
- Version:
- $Id: ContainerFactory.java 1233 2006-11-22 09:15:56Z vmassol $
|
Method Summary |
org.codehaus.cargo.container.Container |
createContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
org.codehaus.cargo.container.configuration.Configuration configuration)
Create a container instance instantiated using the specified configuration. |
java.lang.Class |
getContainerClass(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
|
java.util.Map |
getContainerIds()
|
boolean |
isContainerRegistered(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
|
void |
registerContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
java.lang.Class containerClass)
|
registerContainer
void registerContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
java.lang.Class containerClass)
- Parameters:
containerId - the id of the container to registercontainerType - the container type to register (ContainerType.INSTALLED,
ContainerType.EMBEDDED or ContainerType.REMOTE)containerClass - the container implementation class to register
getContainerClass
java.lang.Class getContainerClass(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
- Parameters:
containerId - the id of the container for which to retrieve the implementation classcontainerType - the container's type (ContainerType.INSTALLED,
ContainerType.EMBEDDED or ContainerType.REMOTE)
- Returns:
- the container implementation class
isContainerRegistered
boolean isContainerRegistered(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
- Parameters:
containerId - the id of the container to checkcontainerType - the container type
- Returns:
- true if the specified container and type is already registered or false otherwise
getContainerIds
java.util.Map getContainerIds()
- Returns:
- the list of container ids that have been registered as Map. The Map keys are the
container ids and the Map values are the lists of
ContainerTypes registered
for that container, as a Set.
createContainer
org.codehaus.cargo.container.Container createContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
org.codehaus.cargo.container.configuration.Configuration configuration)
- Create a container instance instantiated using the specified configuration.
- Parameters:
containerId - the name under which the container will be looked upcontainerType - the container's type (local installed, local embedded, remote, etc)configuration - the configuration to pass to the container's constructor
- Returns:
- the container whose class name matches the parameter passed
Copyright © 2004-2007 Codehaus. All Rights Reserved.