Package org.codehaus.cargo.generic
Class AbstractFactoryRegistry
- java.lang.Object
-
- org.codehaus.cargo.generic.AbstractFactoryRegistry
-
- Direct Known Subclasses:
GeronimoFactoryRegistry
,GlassFishFactoryRegistry
,JBossFactoryRegistry
,JettyFactoryRegistry
,JoFactoryRegistry
,JonasFactoryRegistry
,JRunFactoryRegistry
,LibertyFactoryRegistry
,OrionFactoryRegistry
,PayaraFactoryRegistry
,ResinFactoryRegistry
,TomcatFactoryRegistry
,TomeeFactoryRegistry
,WebLogicFactoryRegistry
,WebSphereFactoryRegistry
,WildFlyFactoryRegistry
,WildFlySwarmFactoryRegistry
public abstract class AbstractFactoryRegistry extends Object
SPI to be implemented by container implementation to register implementations to their factories.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, likeDefaultDeployableFactory
, which internally uses the discovery mechanismContainer implementors should override the 1-arg
register
methods to register its implementations to the given factory.
-
-
Constructor Summary
Constructors Constructor Description AbstractFactoryRegistry()
-
Method Summary
-
-
-
Method Detail
-
register
public static void register(ClassLoader classLoader, DeployableFactory factory)
Discovers all theDeployable
s and adds them to the givenDeployableFactory
.The discovery is done by the standard service loader mechanism, by looking for
/META-INF/services/org.codehaus.cargo.generic.AbstractFactoryRegistry
files.- Parameters:
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 loadedAbstractFactoryRegistry
. 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 whoseregister
method is invoked to receiveDeployable
s that are discovered.
-
register
public static void register(ClassLoader classLoader, ConfigurationFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
public static void register(ClassLoader classLoader, ConfigurationCapabilityFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
public static void register(ClassLoader classLoader, DeployerFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
public static void register(ClassLoader classLoader, PackagerFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
public static void register(ClassLoader classLoader, ContainerFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
public static void register(ClassLoader classLoader, ContainerCapabilityFactory factory)
Seeregister(ClassLoader, DeployableFactory)
for the semantics.- Parameters:
classLoader
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.factory
- Seeregister(ClassLoader, DeployableFactory)
for the semantics.
-
register
protected abstract void register(DeployableFactory factory)
RegistersDeployable
implementations to the givenDeployableFactory
.- Parameters:
factory
- Seeregister(ClassLoader, DeployableFactory)
-
register
protected abstract void register(ConfigurationCapabilityFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
register
protected abstract void register(ConfigurationFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
register
protected abstract void register(DeployerFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
register
protected abstract void register(PackagerFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
register
protected abstract void register(ContainerFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
register
protected abstract void register(ContainerCapabilityFactory factory)
Seeregister(DeployableFactory)
for the semantics.- Parameters:
factory
- Seeregister(DeployableFactory)
-
-