|
||||||||||
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.deployable.DefaultDeployableFactory
public class DefaultDeployableFactory
Default deployable factory that returns deployables for a given container. The reason deployable can be different for different containers is because for some container Cargo understand container-specific files. For example for Tomcat Cargo understand the context.xml file.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.cargo.generic.spi.AbstractGenericHintFactory |
---|
AbstractGenericHintFactory.GenericParameters |
Constructor Summary | |
---|---|
DefaultDeployableFactory()
Register deployable classes mappings. |
|
DefaultDeployableFactory(ClassLoader classLoader)
Register deployable classes mappings. |
Method Summary | |
---|---|
Deployable |
createDeployable(String containerId,
String deployableLocation,
DeployableType deployableType)
|
protected Object |
createInstance(Constructor constructor,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance. |
protected Constructor |
getConstructor(Class deployableClass,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor. |
boolean |
isDeployableRegistered(String containerId,
DeployableType deployableType)
|
void |
registerDeployable(String containerId,
DeployableType deployableType,
Class deployableClass)
Registers a deployable implementation against a container. |
void |
registerDeployable(String containerId,
DeployableType deployableType,
String deployableClassName)
Registers a deployable 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 DefaultDeployableFactory()
public DefaultDeployableFactory(ClassLoader classLoader)
classLoader
- ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, DeployableFactory)
for the details of what this value means.Method Detail |
---|
public void registerDeployable(String containerId, DeployableType deployableType, Class deployableClass)
registerDeployable
in interface DeployableFactory
containerId
- the container id attached to this deployable classdeployableType
- the type to differentiate this deployable from others for the specified
containerdeployableClass
- the deployable implementation class to registerDeployableFactory.registerDeployable(String, DeployableType, Class)
public void registerDeployable(String containerId, DeployableType deployableType, String deployableClassName)
containerId
- deployableType
- deployableClassName
- the deployable implementation class to register as a StringregisterDeployable(String, DeployableType, Class)
public boolean isDeployableRegistered(String containerId, DeployableType deployableType)
isDeployableRegistered
in interface DeployableFactory
containerId
- the container attached to the deployable type classdeployableType
- the type to differentiate this deployable from others for the specified
container
DeployableFactory.isDeployableRegistered(java.lang.String, org.codehaus.cargo.container.deployable.DeployableType)
public Deployable createDeployable(String containerId, String deployableLocation, DeployableType deployableType)
createDeployable
in interface DeployableFactory
containerId
- the container id for which to create the deployable fordeployableLocation
- the location of the Deployable being wrapped. It must point to
a WAR file, an EAR file or an exanded WAR directorydeployableType
- the deployable type to create
Deployable
instanceDeployableFactory.createDeployable(java.lang.String, java.lang.String, org.codehaus.cargo.container.deployable.DeployableType)
protected Constructor getConstructor(Class deployableClass, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws NoSuchMethodException
getConstructor
in class AbstractGenericHintFactory
deployableClass
- implementation class for which to create the constructorhint
- the hint to differentiate this implementation class from othersparameters
- additional parameters necessary to create the constructor object
NoSuchMethodException
- in case of errorAbstractGenericHintFactory.getConstructor(java.lang.Class, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)
protected Object createInstance(Constructor constructor, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws Exception
createInstance
in class AbstractGenericHintFactory
constructor
- the constructor to use for creating the instancehint
- the hint to differentiate this implementation class from othersparameters
- additional parameters necessary to create the instance
Exception
- in case of errorAbstractGenericHintFactory.createInstance(java.lang.reflect.Constructor, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |