org.apache.hivemind.definition
Interface RegistryDefinition

All Known Implementing Classes:
RegistryDefinitionImpl

public interface RegistryDefinition

Defines all modules and their service and configuration points which build a registry. The definition is a blueprint from which a registry instance is constructed. The definition is passed to RegistryBuilder for the next phase: the registry construction. From that moment on the definition shouldn't be changed any longer.

Author:
Achim Huegen

Method Summary
 void addModule(ModuleDefinition module)
          Adds a module definition.
 void addPostProcessor(RegistryDefinitionPostProcessor postProcessor)
          Adds a RegistryDefinitionPostProcessor.
 void addRegistryInitializationListener(RegistryInitializationListener listener)
          Adds a RegistryInitializationListener which is called after the construction of the registry.
 ConfigurationPointDefinition getConfigurationPoint(java.lang.String qualifiedConfigurationPointId)
          Returns a configuration point that is identified by its id.
 ModuleDefinition getModule(java.lang.String id)
          Returns a module that is identified by its module id.
 java.util.Collection getModules()
           
 java.util.List getPostProcessors()
           
 java.util.List getRegistryInitializationListeners()
           
 ServicePointDefinition getServicePoint(java.lang.String qualifiedServicePointId)
          Returns a service point that is identified by its id.
 

Method Detail

addModule

void addModule(ModuleDefinition module)
               throws ApplicationRuntimeException
Adds a module definition.

Parameters:
module - the module
Throws:
ApplicationRuntimeException - if another module with the same id already exists.

getModules

java.util.Collection getModules()
Returns:
a collection of all added modules

getModule

ModuleDefinition getModule(java.lang.String id)
Returns a module that is identified by its module id.

Parameters:
id - the module id
Returns:
the module

addPostProcessor

void addPostProcessor(RegistryDefinitionPostProcessor postProcessor)
Adds a RegistryDefinitionPostProcessor. The processor is called after all module definitions have been processed.

Parameters:
postProcessor - the processor

getPostProcessors

java.util.List getPostProcessors()
Returns:
a collection of all registered RegistryDefinitionPostProcessors

addRegistryInitializationListener

void addRegistryInitializationListener(RegistryInitializationListener listener)
Adds a RegistryInitializationListener which is called after the construction of the registry.

Parameters:
listener - the listener

getRegistryInitializationListeners

java.util.List getRegistryInitializationListeners()
Returns:
a collection of all registered RegistryInitializationListeners

getServicePoint

ServicePointDefinition getServicePoint(java.lang.String qualifiedServicePointId)
Returns a service point that is identified by its id.

Parameters:
qualifiedServicePointId - the fully qualified service point id
Returns:
the service point definition

getConfigurationPoint

ConfigurationPointDefinition getConfigurationPoint(java.lang.String qualifiedConfigurationPointId)
Returns a configuration point that is identified by its id.

Parameters:
qualifiedConfigurationPointId - the fully qualified configuration point id
Returns:
the configuration point definition


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.