public class DefaultDeployableFactory extends AbstractIntrospectionGenericHintFactory<Deployable> implements DeployableFactory
AbstractGenericHintFactory.GenericParameters| Constructor and Description |
|---|
DefaultDeployableFactory()
Register deployable classes mappings.
|
DefaultDeployableFactory(ClassLoader classLoader)
Register deployable classes mappings.
|
| Modifier and Type | Method and Description |
|---|---|
Deployable |
createDeployable(String containerId,
String deployableLocation,
DeployableType deployableType)
Creates an Deployable instance, wrapping a file or a directory.
|
protected Deployable |
createInstance(Constructor<? extends Deployable> constructor,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance.
|
protected Constructor<? extends Deployable> |
getConstructor(Class<? extends Deployable> deployableClass,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor.
|
boolean |
isDeployableRegistered(String containerId,
DeployableType deployableType)
Checks if the deployable specified by the deployable type is registered for a specific
container.
|
void |
registerDeployable(String containerId,
DeployableType deployableType,
Class<? extends Deployable> 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, registerImplementationgetMapping, getMappings, hasMapping, registerImplementationpublic DefaultDeployableFactory()
public DefaultDeployableFactory(ClassLoader classLoader)
classLoader - ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, DeployableFactory) for the
details of what this value means.public void registerDeployable(String containerId, DeployableType deployableType, Class<? extends Deployable> deployableClass)
registerDeployable in interface DeployableFactorycontainerId - 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 DeployableFactorycontainerId - the container id 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 DeployableFactorycontainerId - the container id for which to create the deployable fordeployableLocation - the location of the deployable being wrapped, which must point to
a file or a directory (for an expanded deployable)deployableType - the deployable type to createDeployable instanceDeployableFactory.createDeployable(java.lang.String, java.lang.String, org.codehaus.cargo.container.deployable.DeployableType)protected Constructor<? extends Deployable> getConstructor(Class<? extends Deployable> deployableClass, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws NoSuchMethodException
getConstructor in class AbstractGenericHintFactory<Deployable>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<? extends T>, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)protected Deployable createInstance(Constructor<? extends Deployable> constructor, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws Exception
createInstance in class AbstractGenericHintFactory<Deployable>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<? extends T>, java.lang.String, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)Copyright © 2004–2015 Github. All rights reserved.