org.codehaus.cargo.generic.spi
Class AbstractIntrospectionGenericHintFactory
java.lang.Object
org.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory
org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory
- All Implemented Interfaces:
- org.codehaus.cargo.util.log.Loggable
- Direct Known Subclasses:
- DefaultConfigurationCapabilityFactory, DefaultConfigurationFactory, DefaultContainerCapabilityFactory, DefaultContainerFactory, DefaultDeployableFactory, DefaultDeployerFactory, DefaultPackagerFactory
public abstract class AbstractIntrospectionGenericHintFactory
- extends AbstractGenericHintFactory
Extension to AbstractGenericHintFactory
that registers and creates instances from
implementation classes specified as String, using introspection. If the implementation fails
to load the registration fails silently. This is to cover the user case where a specific
container's implementation jar may not be present in the classpath if it's not used by the user.
This allows users to only put the container implementation jars the require in the classpath.
- Version:
- $Id: AbstractIntrospectionGenericHintFactory.java 1233 2006-11-22 09:15:56Z vmassol $
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 |
AbstractIntrospectionGenericHintFactory
public AbstractIntrospectionGenericHintFactory()
registerImplementation
protected void registerImplementation(RegistrationKey key,
java.lang.String objectClassName)
- Allow registering container objects using introspection so that at build time and runtime
the user can handpick the container implementation jars that he want to use. If we were not
using introspection the user would have to have all container implementation jars in the
classpath when using this generic API.
- Parameters:
key
- the key under which to register the class nameobjectClassName
- the object to register
createImplementation
protected java.lang.Object createImplementation(RegistrationKey key,
AbstractGenericHintFactory.GenericParameters parameters,
java.lang.String implementationConceptName)
- Generic method to create an implementation based on the registered implementation classes.
- Overrides:
createImplementation
in class AbstractGenericHintFactory
- Parameters:
key
- the key under which the implementation class is registeredparameters
- the additional parameters necessary to create the constructor objectimplementationConceptName
- the name of what the implementation class is representing.
This is used in exception text messages to provide message customization. For
example "container", "configuration", "deployable', etc.
- Returns:
- the created instance
- See Also:
AbstractGenericHintFactory.createImplementation(org.codehaus.cargo.generic.internal.util.RegistrationKey, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters, java.lang.String)
Copyright © 2004-2009 Codehaus. All Rights Reserved.