|
||||||||||
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.packager.DefaultPackagerFactory
public class DefaultPackagerFactory
Default PackagerFactory
implementation that has all the known container
packagers registered against their containers. It also supports registering new
packagers against any container.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.cargo.generic.spi.AbstractGenericHintFactory |
---|
AbstractGenericHintFactory.GenericParameters |
Constructor Summary | |
---|---|
DefaultPackagerFactory()
Register default deployers. |
|
DefaultPackagerFactory(ClassLoader classLoader)
Register packager name mappings. |
Method Summary | |
---|---|
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. |
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 DefaultPackagerFactory()
public DefaultPackagerFactory(ClassLoader classLoader)
classLoader
- ClassLoader to discover implementations from. See
AbstractFactoryRegistry.register(ClassLoader, PackagerFactory)
for the details of what this value means.Method Detail |
---|
public void registerPackager(String containerId, PackagerType packagerType, Class packagerClass)
Packager
implementation.
registerPackager
in interface PackagerFactory
containerId
- 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 PackagerFactory
containerId
- the container attached to this packager classpackagerType
- the type to differentiate this packager from others for the specified
container
PackagerFactory.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 PackagerFactory
containerId
- 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 AbstractGenericHintFactory
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 object
NoSuchMethodException
- 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 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 |