|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory
org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory
org.codehaus.cargo.generic.DefaultContainerFactory
public class DefaultContainerFactory
Default implementation of ContainerFactory. Registers all known containers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.codehaus.cargo.generic.spi.AbstractGenericHintFactory |
|---|
AbstractGenericHintFactory.GenericParameters |
| Constructor Summary | |
|---|---|
DefaultContainerFactory()
Initialize container name mappings with container ids. |
|
| 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. |
protected java.lang.Object |
createInstance(java.lang.reflect.Constructor constructor,
java.lang.String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance. |
protected java.lang.reflect.Constructor |
getConstructor(java.lang.Class containerClass,
java.lang.String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor. |
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)
|
void |
registerContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
java.lang.String containerClassName)
Registers a container using a class specified as a String. |
| Methods inherited from class org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory |
|---|
createImplementation, registerImplementation |
| Methods inherited from class org.codehaus.cargo.generic.spi.AbstractGenericHintFactory |
|---|
getMapping, getMappings, hasMapping, registerImplementation |
| Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
|---|
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultContainerFactory()
| Method Detail |
|---|
public boolean isContainerRegistered(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
isContainerRegistered in interface ContainerFactorycontainerId - the id of the container to checkcontainerType - the container type
ContainerFactory.isContainerRegistered(String, ContainerType)
public void registerContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
java.lang.Class containerClass)
registerContainer in interface ContainerFactorycontainerId - 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 registerContainerFactory.registerContainer(String, org.codehaus.cargo.container.ContainerType, Class)
public void registerContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
java.lang.String containerClassName)
containerId - containerType - containerClassName - the container implementation class to register as a StringregisterContainer(String, ContainerType, Class)
public java.lang.Class getContainerClass(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType)
getContainerClass in interface ContainerFactorycontainerId - the id of the container for which to retrieve the implementation classcontainerType - the container's type (ContainerType.INSTALLED,
ContainerType.EMBEDDED or ContainerType.REMOTE)
ContainerFactory.getContainerClass(java.lang.String, org.codehaus.cargo.container.ContainerType)
public org.codehaus.cargo.container.Container createContainer(java.lang.String containerId,
org.codehaus.cargo.container.ContainerType containerType,
org.codehaus.cargo.container.configuration.Configuration configuration)
createContainer in interface ContainerFactorycontainerId - 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
ContainerFactory.createContainer(String, ContainerType, Configuration)
protected java.lang.reflect.Constructor getConstructor(java.lang.Class containerClass,
java.lang.String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
throws java.lang.NoSuchMethodException
getConstructor in class AbstractGenericHintFactorycontainerClass - implementation class for which to create the constructorcontainerType - the hint to differentiate this implementation class from othersparameters - additional parameters necessary to create the constructor object
java.lang.NoSuchMethodException - in case of errorAbstractGenericHintFactory.getConstructor(java.lang.Class, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)
protected java.lang.Object createInstance(java.lang.reflect.Constructor constructor,
java.lang.String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
throws java.lang.Exception
createInstance in class AbstractGenericHintFactoryconstructor - the constructor to use for creating the instancecontainerType - the hint to differentiate this implementation class from othersparameters - additional parameters necessary to create the instance
java.lang.Exception - in case of errorAbstractGenericHintFactory.createInstance(java.lang.reflect.Constructor, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)public java.util.Map getContainerIds()
getContainerIds in interface ContainerFactoryContainerTypes registered
for that container, as a Set.ContainerFactory.getContainerIds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||