public class DefaultPackagerFactory extends AbstractIntrospectionGenericHintFactory implements PackagerFactory
PackagerFactory implementation that has all the known container
packagers registered against their containers. It also supports registering new
packagers against any container.AbstractGenericHintFactory.GenericParameters| Constructor and Description |
|---|
DefaultPackagerFactory()
Register default deployers.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
createInstance(Constructor constructor,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance.
|
Packager |
createPackager(String containerId,
PackagerType packagerType,
String outputLocation)
Create a
Packager instance matching the
specified container id. |
protected Constructor |
getConstructor(Class deployerClass,
String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor.
|
boolean |
isPackagerRegistered(String containerId,
PackagerType packagerType) |
void |
registerPackager(String containerId,
PackagerType packagerType,
Class packagerClass)
Registers a
Packager implementation. |
void |
registerPackager(String containerId,
PackagerType packagerType,
String packagerClassName)
Registers a packager using a class specified as a String.
|
createImplementation, registerImplementationgetMapping, getMappings, hasMapping, registerImplementationpublic DefaultPackagerFactory()
public void registerPackager(String containerId, PackagerType packagerType, Class packagerClass)
Packager implementation.registerPackager in interface PackagerFactorycontainerId - the container attached to this packagerpackagerType - the packager's type (directory, zip, etc)packagerClass - the packager implementation class to registerPackagerFactory.registerPackager(String, org.codehaus.cargo.container.packager.PackagerType, Class)public void registerPackager(String containerId, PackagerType packagerType, String packagerClassName)
containerId - packagerType - packagerClassName - the packager implementation class to register as a StringregisterPackager(String, org.codehaus.cargo.container.packager.PackagerType, Class)public boolean isPackagerRegistered(String containerId, PackagerType packagerType)
isPackagerRegistered in interface PackagerFactorycontainerId - the container attached to this packager classpackagerType - the type to differentiate this packager from others for the specified
containerPackagerFactory.isPackagerRegistered(String, org.codehaus.cargo.container.packager.PackagerType)public Packager createPackager(String containerId, PackagerType packagerType, String outputLocation)
Packager instance matching the
specified container id.createPackager in interface PackagerFactorycontainerId - the container for which we need to create a packager instancepackagerType - the packager's type (directory, zip, etc)outputLocation - the location where the package will be generated. For example for
a Directory Packager this will be the directory into which the package will be
generated.PackagerFactory.createPackager(java.lang.String, org.codehaus.cargo.container.packager.PackagerType, java.lang.String)protected Constructor getConstructor(Class deployerClass, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws NoSuchMethodException
getConstructor in class AbstractGenericHintFactorydeployerClass - 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, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters)protected Object createInstance(Constructor constructor, String hint, AbstractGenericHintFactory.GenericParameters parameters) throws Exception
createInstance in class AbstractGenericHintFactoryconstructor - 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.