|
||||||||||
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. |
|
DefaultContainerFactory(java.lang.ClassLoader classLoader)
Register packager name mappings. |
Method Summary | |
---|---|
Container |
createContainer(java.lang.String containerId,
ContainerType containerType,
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,
ContainerType containerType)
|
java.util.Map |
getContainerIds()
|
boolean |
isContainerRegistered(java.lang.String containerId,
ContainerType containerType)
|
void |
registerContainer(java.lang.String containerId,
ContainerType containerType,
java.lang.Class containerClass)
|
void |
registerContainer(java.lang.String containerId,
ContainerType containerType,
java.lang.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 |
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()
public DefaultContainerFactory(java.lang.ClassLoader classLoader)
classLoader
- ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, ContainerFactory)
for the details of what this value means.Method Detail |
---|
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(java.lang.String containerId, ContainerType containerType)
isContainerRegistered
in interface ContainerFactory
containerId
- the id of the container to checkcontainerType
- the container type
ContainerFactory.isContainerRegistered(String, ContainerType)
public void registerContainer(java.lang.String containerId, ContainerType containerType, java.lang.Class containerClass)
registerContainer
in interface ContainerFactory
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 registerContainerFactory.registerContainer(String, org.codehaus.cargo.container.ContainerType, Class)
public void registerContainer(java.lang.String containerId, 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, ContainerType containerType)
getContainerClass
in interface ContainerFactory
containerId
- 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(java.lang.String containerId, ContainerType containerType, Configuration configuration)
createContainer
in interface ContainerFactory
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
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 AbstractGenericHintFactory
containerClass
- 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 AbstractGenericHintFactory
constructor
- 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 ContainerFactory
ContainerType
s 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 |