public class DefaultContainerFactory extends AbstractIntrospectionGenericHintFactory implements ContainerFactory
ContainerFactory. Registers all known containers.AbstractGenericHintFactory.GenericParameters| Constructor and Description |
|---|
DefaultContainerFactory()
Initialize container name mappings with container ids.
|
DefaultContainerFactory(ClassLoader classLoader)
Register packager name mappings.
|
| Modifier and Type | Method and Description |
|---|---|
Container |
createContainer(String containerId,
ContainerType containerType,
Configuration configuration)
Create a container instance instantiated using the specified configuration.
|
protected Object |
createInstance(Constructor constructor,
String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance.
|
protected Constructor |
getConstructor(Class containerClass,
String containerType,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor.
|
Class |
getContainerClass(String containerId,
ContainerType containerType) |
Map |
getContainerIds() |
boolean |
isContainerRegistered(String containerId,
ContainerType containerType) |
void |
registerContainer(String containerId,
ContainerType containerType,
Class containerClass) |
void |
registerContainer(String containerId,
ContainerType containerType,
String containerClassName)
Registers a container using a class specified as a String.
|
void |
registerGeronimo()
Register Apache Geronimo
|
void |
registerJBoss()
Register JBoss
|
void |
registerJetty()
Register Jetty
|
void |
registerJO()
Register JO!
|
void |
registerJOnAS()
Register OW2 JOnAS
|
void |
registerJRun()
Register JRun
|
void |
registerOrion()
Register Orion
|
void |
registerResin()
Register Resin
|
void |
registerTomcat()
Register Tomcat
|
void |
registerWeblogic()
Register BEA/Oracle Weblogic
|
createImplementation, registerImplementationgetMapping, getMappings, hasMapping, registerImplementationpublic DefaultContainerFactory()
public DefaultContainerFactory(ClassLoader classLoader)
classLoader - ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, ContainerFactory)
for the details of what this value means.public void registerGeronimo()
public void registerJBoss()
public void registerJetty()
public void registerJO()
public void registerJOnAS()
public void registerJRun()
public void registerOrion()
public void registerResin()
public void registerTomcat()
public void registerWeblogic()
public boolean isContainerRegistered(String containerId, ContainerType containerType)
isContainerRegistered in interface ContainerFactorycontainerId - the id of the container to checkcontainerType - the container typeContainerFactory.isContainerRegistered(String, ContainerType)public void registerContainer(String containerId, ContainerType containerType, 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(String containerId, ContainerType containerType, String containerClassName)
containerId - containerType - containerClassName - the container implementation class to register as a StringregisterContainer(String, ContainerType, Class)public Class getContainerClass(String containerId, 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 Container createContainer(String containerId, ContainerType containerType, 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 constructorContainerFactory.createContainer(String, ContainerType, Configuration)protected Constructor getConstructor(Class containerClass, String containerType, AbstractGenericHintFactory.GenericParameters parameters) throws 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 objectNoSuchMethodException - in case of errorAbstractGenericHintFactory.getConstructor(java.lang.Class, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)protected Object createInstance(Constructor constructor, String containerType, AbstractGenericHintFactory.GenericParameters parameters) throws 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 instanceException - in case of errorAbstractGenericHintFactory.createInstance(java.lang.reflect.Constructor, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)public Map getContainerIds()
getContainerIds in interface ContainerFactoryContainerTypes registered
for that container, as a Set.ContainerFactory.getContainerIds()Copyright © 2004-2013 Codehaus. All Rights Reserved.