public abstract class AbstractFactoryRegistry extends Object
This class also provides static methods (to be used primarily within Cargo but can be also called directly by client apps) to discover all the implementations and register them to factories.
Client apps should normally use DefaultXXXFactory classes, like
DefaultDeployableFactory, which internally uses the
discovery mechanism
Container implementors should override the 1-arg register methods to register its
implementations to the given factory.
| Constructor and Description |
|---|
AbstractFactoryRegistry() |
public static void register(ClassLoader classLoader, DeployableFactory factory)
Deployables and adds them
to the given DeployableFactory.
The discovery is done by the standard service loader mechanism, by looking for /META-INF/services/org.codehaus.cargo.generic.AbstractFactoryRegistry files.
classLoader - The class loader to be used to search service provide configuration files.
If null, the value defaults to the thread context classloader. If that's also null, the value
defaults to the class loader that loaded AbstractFactoryRegistry. In the rare
circumstance of that also being null (which means Cargo is loaded in the bootstrap
classloader), the value defaults to the system class loader.factory - The factory whose register method is invoked to receive
Deployables that are discovered.public static void register(ClassLoader classLoader, ConfigurationFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.public static void register(ClassLoader classLoader, ConfigurationCapabilityFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.public static void register(ClassLoader classLoader, DeployerFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.public static void register(ClassLoader classLoader, PackagerFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.public static void register(ClassLoader classLoader, ContainerFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.public static void register(ClassLoader classLoader, ContainerCapabilityFactory factory)
register(ClassLoader, DeployableFactory) for the semantics.classLoader - See register(ClassLoader, DeployableFactory) for the semantics.factory - See register(ClassLoader, DeployableFactory) for the semantics.protected abstract void register(DeployableFactory factory)
Deployable implementations to the
given DeployableFactory.factory - See register(ClassLoader, DeployableFactory)protected abstract void register(ConfigurationCapabilityFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)protected abstract void register(ConfigurationFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)protected abstract void register(DeployerFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)protected abstract void register(PackagerFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)protected abstract void register(ContainerFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)protected abstract void register(ContainerCapabilityFactory factory)
register(DeployableFactory) for the semantics.factory - See register(DeployableFactory)Copyright © 2004–2015 Github. All rights reserved.