| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.impl.RegistryImpl
public class RegistryImpl
Implementation of Registry that delegates to an instance of
 RegistryInfrastructure.
| Constructor Summary | |
|---|---|
| RegistryImpl(RegistryInfrastructure infrastructure) | |
| 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 RegistryShutdownListenerservices and objects. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RegistryImpl(RegistryInfrastructure infrastructure)
| Method Detail | 
|---|
public boolean containsConfiguration(java.lang.String configurationId)
Registry
containsConfiguration in interface Registrypublic boolean containsService(java.lang.Class serviceInterface)
Registry
containsService in interface Registry
public boolean containsService(java.lang.String serviceId,
                               java.lang.Class serviceInterface)
Registry
containsService in interface Registrypublic java.lang.Object getConfiguration(java.lang.Class configurationType)
Registry
getConfiguration in interface RegistryconfigurationType - the configuration type
public java.lang.Object getConfiguration(java.lang.String configurationId)
Registry
getConfiguration in interface RegistryconfigurationId - the fully qualified id of the configuration to obtain
public java.lang.Object getService(java.lang.String serviceId,
                                   java.lang.Class serviceInterface)
Registry
getService in interface RegistryserviceId - the fully qualified id of the service to obtainserviceInterface - the class to which the service will be cast
public java.lang.Object getService(java.lang.Class serviceInterface)
Registry
getService in interface RegistryserviceInterface - the class to which the service will be cast.
Registry.getService(String, Class)public java.util.Locale getLocale()
Registry
getLocale in interface Registrypublic void shutdown()
RegistryRegistryShutdownListener 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.
shutdown in interface Registrypublic void cleanupThread()
RegistryThreadEventNotifier.fireThreadCleanup().
cleanupThread in interface Registrypublic void setupThread()
Registry
setupThread in interface RegistryServiceSerializationHelper, 
ServiceSerializationSupportpublic java.util.List getServiceIds(java.lang.Class serviceInterface)
Registry
getServiceIds in interface Registrypublic Messages getModuleMessages(java.lang.String moduleId)
Registry
getModuleMessages in interface RegistrymoduleId - the module id
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||