public class DefaultDeployerFactory extends AbstractIntrospectionGenericHintFactory<Deployer> implements DeployerFactory
DeployerFactory implementation that has all the known container deployers
registered against their containers. It also supports registering new deployers against any
container.AbstractGenericHintFactory.GenericParameters| Constructor and Description |
|---|
DefaultDeployerFactory()
Register default deployers.
|
DefaultDeployerFactory(ClassLoader classLoader)
Register deployer name mappings.
|
| Modifier and Type | Method and Description |
|---|---|
Deployer |
createDeployer(Container container)
Create a
Deployer instance whose type matches the container's type. |
Deployer |
createDeployer(Container container,
DeployerType deployerType)
Create a
Deployer instance matching the specified container and type. |
protected Deployer |
createInstance(Constructor<? extends Deployer> constructor,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance.
|
protected Constructor<? extends Deployer> |
getConstructor(Class<? extends Deployer> deployerClass,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor.
|
Class<? extends Deployer> |
getDeployerClass(String containerId,
DeployerType deployerType) |
boolean |
isDeployerRegistered(String containerId,
DeployerType deployerType) |
void |
registerDeployer(String containerId,
DeployerType deployerType,
Class<? extends Deployer> deployerClass)
Registers a
Deployer implementation. |
void |
registerDeployer(String containerId,
DeployerType deployerType,
String deployerClassName)
Registers a deployer using a class specified as a String.
|
createImplementation, registerImplementationgetMapping, getMappings, hasMapping, registerImplementationpublic DefaultDeployerFactory()
public DefaultDeployerFactory(ClassLoader classLoader)
classLoader - ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, DeployerFactory) for the
details of what this value means.public void registerDeployer(String containerId, DeployerType deployerType, Class<? extends Deployer> deployerClass)
Deployer implementation.registerDeployer in interface DeployerFactorycontainerId - the container attached to this deployerClassdeployerType - the deployer's type (local, remote, etc)deployerClass - the deployer implementation class to registerDeployerFactory.registerDeployer(String, DeployerType, Class)public void registerDeployer(String containerId, DeployerType deployerType, String deployerClassName)
containerId - deployerType - deployerClassName - the deployer implementation class to register as a StringregisterDeployer(String, DeployerType, Class)public boolean isDeployerRegistered(String containerId, DeployerType deployerType)
isDeployerRegistered in interface DeployerFactorycontainerId - the container attached to this deployer classdeployerType - the type to differentiate this deployer from others for the specified
containerDeployerFactory.isDeployerRegistered(String, DeployerType)public Class<? extends Deployer> getDeployerClass(String containerId, DeployerType deployerType)
getDeployerClass in interface DeployerFactorycontainerId - the container attached to this deployer classdeployerType - the deployer's typeDeployerFactory.getDeployerClass(String,
org.codehaus.cargo.container.deployer.DeployerType)public Deployer createDeployer(Container container, DeployerType deployerType)
Deployer instance matching the specified container and type.createDeployer in interface DeployerFactorycontainer - the container for which we need to create a deployer instancedeployerType - the deployer's type (local, remote, etc)DeployerFactory.createDeployer(Container, DeployerType)public Deployer createDeployer(Container container)
Deployer instance whose type matches the container's type. For example this
creates a local deployer when the container's instance passed is a local container and a
remote deployer when the container's instance passed is a remote container.createDeployer in interface DeployerFactorycontainer - the container for which we need to create a deployer instanceDeployerFactory.createDeployer(Container)protected Constructor<? extends Deployer> getConstructor(Class<? extends Deployer> deployerClass, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws NoSuchMethodException
getConstructor in class AbstractGenericHintFactory<Deployer>deployerClass - 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(Class, String,
GenericParameters)protected Deployer createInstance(Constructor<? extends Deployer> constructor, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws Exception
createInstance in class AbstractGenericHintFactory<Deployer>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.