| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.impl.RegistryBuilder
public final class RegistryBuilder
Class used to build a Registry from a RegistryDefinition. 
 
 A note about threadsafety: The assumption is that a single thread will access the RegistryBuilder
 at one time (typically, a startup class within some form of server or application). Code here and
 in many of the related classes is divided into construction-time logic and runtime logic. Runtime
 logic is synchronized and threadsafe. Construction-time logic is not threadsafe. Once the
 registry is fully constructed, it is not allowed to invoke those methods (though, at this time,
 no checks occur).
 
 Runtime methods, such as ModuleImpl.getService(String, Class)
 are fully threadsafe.
| Constructor Summary | |
|---|---|
| RegistryBuilder()Constructs a new instance that starts with a empty RegistryDefinitionwhich can be 
 requested bygetRegistryDefinition(). | |
| RegistryBuilder(ErrorHandler errorHandler) | |
| RegistryBuilder(RegistryDefinition registryDefinition)Constructs a new instance that starts with the provided RegistryDefinition. | |
| RegistryBuilder(RegistryDefinition registryDefinition,
                               ErrorHandler errorHandler) | |
| Method Summary | |
|---|---|
|  void | autoDetectModules()Automatically loads hivemind modules on the classpath which are provided by RegistryProviders which are defined in Manifest-Files. | 
|  void | checkContributionCounts(RegistryDefinition definition)Checks that each configuration extension point has the right number of contributions. | 
| static Registry | constructDefaultRegistry()Constructs a default registry based on just the modules visible to the thread context class loader (this is sufficient is the majority of cases), and using the default locale. | 
|  Registry | constructRegistry()Constructs the registry from its RegistryDefinition. | 
|  Registry | constructRegistry(java.util.Locale locale)Constructs the registry from its RegistryDefinition. | 
| static Registry | constructRegistry(RegistryDefinition definition,
                                   ErrorHandler errorHandler,
                                   java.util.Locale locale)Constructs the registry from a specified RegistryDefinition. | 
|  ErrorHandler | getErrorHandler() | 
|  RegistryDefinition | getRegistryDefinition() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RegistryBuilder()
RegistryDefinition which can be 
 requested by getRegistryDefinition().
public RegistryBuilder(RegistryDefinition registryDefinition)
RegistryDefinition.
 The definition can still be altered afterwards.
public RegistryBuilder(ErrorHandler errorHandler)
public RegistryBuilder(RegistryDefinition registryDefinition,
                       ErrorHandler errorHandler)
| Method Detail | 
|---|
public RegistryDefinition getRegistryDefinition()
public Registry constructRegistry()
RegistryDefinition. Default locale is used.
constructRegistry(Locale)public Registry constructRegistry(java.util.Locale locale)
RegistryDefinition.
locale - the locale used for translating resources
public static Registry constructRegistry(RegistryDefinition definition,
                                         ErrorHandler errorHandler,
                                         java.util.Locale locale)
RegistryDefinition.
definition - the registry definitionerrorHandler - errorHandler used for handling recoverable errorslocale - the locale used for translating resources
public void checkContributionCounts(RegistryDefinition definition)
public void autoDetectModules()
RegistryProviders which are defined in Manifest-Files.
public static Registry constructDefaultRegistry()
public ErrorHandler getErrorHandler()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||