|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Registry
The HiveMind registry; primarily this is used to gain access to services.
Method Summary | |
---|---|
void |
cleanupThread()
Convienience for invoking ThreadEventNotifier.fireThreadCleanup() . |
boolean |
containsConfiguration(java.lang.String configurationId)
Returns true if a configuration for the specified id exists. |
boolean |
containsService(java.lang.Class serviceInterface)
Returns true if a single service for the specified service interface class exists. |
boolean |
containsService(java.lang.String serviceId,
java.lang.Class serviceInterface)
Returns true if a service for the specified service id and service interface exists. |
java.lang.Object |
getConfiguration(java.lang.Class configurationType)
Finds a configuration of the specified type. |
java.lang.Object |
getConfiguration(java.lang.String configurationId)
Returns the container of the configuration point. |
java.util.Locale |
getLocale()
Returns the locale for which the registry was created. |
Messages |
getModuleMessages(java.lang.String moduleId)
Returns the Messages object for the specified module. |
java.lang.Object |
getService(java.lang.Class serviceInterface)
Convenience method to obtain a service with a single implementation from the registry. |
java.lang.Object |
getService(java.lang.String serviceId,
java.lang.Class serviceInterface)
Obtains a service from the registry. |
java.util.List |
getServiceIds(java.lang.Class serviceInterface)
Returns a list of service ids for service points which implement the desired service interface. |
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. |
Method Detail |
---|
boolean containsConfiguration(java.lang.String configurationId)
configurationId
-
boolean containsService(java.lang.Class serviceInterface)
serviceInterface
-
boolean containsService(java.lang.String serviceId, java.lang.Class serviceInterface)
serviceId
- serviceInterface
-
java.lang.Object getConfiguration(java.lang.String configurationId)
configurationId
- the fully qualified id of the configuration to obtain
ApplicationRuntimeException
- if the configuration does not exist, etc.java.lang.Object getConfiguration(java.lang.Class configurationType)
configurationType
- the configuration type
ApplicationRuntimeException
- if no such configuration extension point exists (or visible)java.lang.Object getService(java.lang.String serviceId, java.lang.Class serviceInterface)
serviceId
- the fully qualified id of the service to obtainserviceInterface
- the class to which the service will be cast
ApplicationRuntimeException
- if the service does not exist, or if it can't be cast to the specified service
interfacejava.lang.Object getService(java.lang.Class serviceInterface)
serviceInterface
- the class to which the service will be cast.
ApplicationRuntimeException
- if there are no service extension points implementing the given interface, or if
there multiple service points implementing it.getService(String, Class)
java.util.Locale getLocale()
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)
Messages getModuleMessages(java.lang.String moduleId)
moduleId
- the module id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |