public class DefaultDeployableFactory extends AbstractIntrospectionGenericHintFactory implements DeployableFactory
AbstractGenericHintFactory.GenericParameters
Constructor and Description |
---|
DefaultDeployableFactory()
Register deployable classes mappings.
|
Modifier and Type | Method and Description |
---|---|
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.
|
createImplementation, registerImplementation
getMapping, getMappings, hasMapping, registerImplementation
public DefaultDeployableFactory()
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
containerDeployableFactory.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 createDeployable
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 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 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 instanceException
- in case of errorAbstractGenericHintFactory.createInstance(java.lang.reflect.Constructor, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)
Copyright © 2004-2013 Codehaus. All Rights Reserved.