public final class RegistryBuilder extends Object
Registry
. This class is not thread-safe. The
Registry, once created, is thread-safe.Constructor and Description |
---|
RegistryBuilder() |
RegistryBuilder(ClassLoader classLoader) |
RegistryBuilder(ClassLoader classLoader,
LoggerSource loggerSource) |
Modifier and Type | Method and Description |
---|---|
RegistryBuilder |
add(Class... moduleClasses)
Adds a number of modules (as module classes) to the registry, returning the builder for further configuration.
|
RegistryBuilder |
add(ModuleDef moduleDef)
Adds a
ModuleDef to the registry, returning the builder for further configuration. |
RegistryBuilder |
add(String classname)
Adds a modle class (specified by fully qualified class name) to the registry, returning the builder
for further configuration.
|
Registry |
build()
Constructs and returns the registry; this may only be done once.
|
static Registry |
buildAndStartupRegistry(Class... moduleClasses)
Constructs the registry, adds a number of modules (as module classes) to the registry and
performs registry startup.
|
static Registry |
buildAndStartupRegistry(ModuleDef moduleDef,
Class... moduleClasses)
Constructs the registry, adds a
ModuleDef and a number of modules (as module classes) to the registry and
performs registry startup. |
ClassLoader |
getClassLoader() |
org.slf4j.Logger |
getLogger() |
public RegistryBuilder()
public RegistryBuilder(ClassLoader classLoader)
public RegistryBuilder(ClassLoader classLoader, LoggerSource loggerSource)
public RegistryBuilder add(ModuleDef moduleDef)
ModuleDef
to the registry, returning the builder for further configuration.public RegistryBuilder add(Class... moduleClasses)
ImportModule
public RegistryBuilder add(String classname)
ImportModule
public Registry build()
Registry.performRegistryStartup()
.public ClassLoader getClassLoader()
public org.slf4j.Logger getLogger()
public static Registry buildAndStartupRegistry(ModuleDef moduleDef, Class... moduleClasses)
ModuleDef
and a number of modules (as module classes) to the registry and
performs registry startup. The returned registry is ready to use. The caller is must not invoke
Registry.performRegistryStartup()
.public static Registry buildAndStartupRegistry(Class... moduleClasses)
Registry.performRegistryStartup()
.moduleClasses
- modules (as module classes) to addRegistry
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.