|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RegistryInfrastructure
Extension of Registry
provided by some internals of HiveMind to
faciliate the creation of services and configurations.
Method Summary | |
---|---|
void |
cleanupThread()
Convienience for invoking ThreadEventNotifier.fireThreadCleanup() . |
boolean |
containsConfiguration(java.lang.String configurationId,
Module module)
Returns true if a configuration for the specified id exists (and is visible to the specified module). |
boolean |
containsService(java.lang.Class serviceInterface,
Module module)
Returns true if a single service exists which implements the specified service interface and is visible to the given module. |
boolean |
containsService(java.lang.String serviceId,
java.lang.Class serviceInterface,
Module module)
Returns true if a single service with the given id exists which implements the specified service interface and is visible to the given module. |
java.lang.Object |
getConfiguration(java.lang.Class configurationType,
Module module)
Finds a configuration of the specified type. |
java.lang.Object |
getConfiguration(java.lang.String configurationId,
Module module)
Returns the specified configuration. |
ConfigurationPoint |
getConfigurationPoint(java.lang.String configurationId,
Module module)
Returns the configuration point. |
ErrorHandler |
getErrorHander()
Returns the ErrorHandler for this Registry. |
java.util.Locale |
getLocale()
Returns the locale for which the registry was created. |
Module |
getModule(java.lang.String moduleId)
Returns the module with the corresponding module id. |
java.lang.Object |
getService(java.lang.Class serviceInterface,
Module module)
Finds a service that implements the provided interface. |
java.lang.Object |
getService(java.lang.String serviceId,
java.lang.Class serviceInterface,
Module module)
Obtains a service from the registry. |
java.util.List |
getServiceIds(java.lang.Class serviceInterface)
|
ServiceModelFactory |
getServiceModelFactory(java.lang.String name)
Returns a named service-model factory |
ServicePoint |
getServicePoint(java.lang.String serviceId,
Module module)
Returns the identified service extension point. |
void |
setupThread()
To be invoked at the start of each request in a multi-threaded environment. |
void |
shutdown()
Shuts down the registry; this notifies all RegistryShutdownListener services and objects. |
void |
startup()
Invoked once, just after the registry infrastructure is constructed. |
Method Detail |
---|
java.lang.Object getService(java.lang.String serviceId, java.lang.Class serviceInterface, Module module)
serviceId
- the fully qualified id of the service to obtainserviceInterface
- the class to which the service will be castmodule
- the referencing module, used for visibility checks (null means no module, which
requires that the service be public)
ApplicationRuntimeException
- if the service does not exist (or is not visible), or if it can't be cast to the
specified service interfacejava.lang.Object getService(java.lang.Class serviceInterface, Module module)
serviceInterface
- used to locate the servicemodule
- the referencing module, used for visibility checks. If null, then only public
service points will be considered.
ApplicationRuntimeException
- if either 0, or more than 1, service point is visible to the modulejava.lang.Object getConfiguration(java.lang.String configurationId, Module module)
configurationId
- the fully qualified id of the configurationmodule
- the referencing module, used for visibility checks (null means no module, which
requires that the configuration be public)
ApplicationRuntimeException
- if no such configuration extension point exists (or visible)java.lang.Object getConfiguration(java.lang.Class configurationType, Module module)
configurationType
- the configuration typemodule
- the referencing module, used for visibility checks (null means no module, which
requires that the configuration be public)
ApplicationRuntimeException
- if no such configuration extension point exists (or visible)ConfigurationPoint getConfigurationPoint(java.lang.String configurationId, Module module)
configurationId
- the fully qualified id of the configurationmodule
- the referencing module, used for visibility checks (null means no module, which
requires that the configuration be public)
ApplicationRuntimeException
- if the configurationId does not exist (or is not visible)ServicePoint getServicePoint(java.lang.String serviceId, Module module)
serviceId
- fully qualified id of the service pointmodule
- the referencing module, used for visibility checks (null means no module, which
requires that the service be public)
ApplicationRuntimeException
- if no such service extension point exists (or is visible to the module)ServiceModelFactory getServiceModelFactory(java.lang.String name)
java.util.Locale getLocale()
ErrorHandler getErrorHander()
ErrorHandler
for this Registry.
boolean containsConfiguration(java.lang.String configurationId, Module module)
configurationId
- to search formodule
- the configuration must be visible to, or null for no module (the application's
view
boolean containsService(java.lang.Class serviceInterface, Module module)
serviceInterface
- module
- the service must be visible to the module (or null for the application's view)
boolean containsService(java.lang.String serviceId, java.lang.Class serviceInterface, Module module)
serviceId
- serviceInterface
- module
- the service must be visible to the module (or null for the application's view)
void startup()
hivemind.Startup
.
void shutdown()
RegistryShutdownListener
services and objects. Once the
registry is shutdown, it is no longer valid to obtain new services or configurations, or even
use existing services and configurations.
void setupThread()
ServiceSerializationHelper
,
ServiceSerializationSupport
void cleanupThread()
ThreadEventNotifier.fireThreadCleanup()
.
java.util.List getServiceIds(java.lang.Class serviceInterface)
serviceInterface
- Module getModule(java.lang.String moduleId)
moduleId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |