| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.impl.RegistryInfrastructureImpl
public final class RegistryInfrastructureImpl
Implementation of RegistryInfrastructure.
| Constructor Summary | |
|---|---|
| RegistryInfrastructureImpl(ErrorHandler errorHandler,
                                                     java.util.Locale locale) | |
| Method Summary | |
|---|---|
|  void | addConfigurationPoint(ConfigurationPoint point) | 
|  void | addModule(Module module) | 
|  void | addServicePoint(ServicePoint point) | 
|  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 ErrorHandlerfor 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.lang.Object | getServiceFromToken(ServiceToken token)Returns the service (proxy) for the indicated token. | 
|  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. | 
|  ServiceToken | getServiceTokenForService(java.lang.String serviceId)Returns a ServiceTokencorresponding to the indicated serviceId. | 
|  void | setShutdownCoordinator(ShutdownCoordinator coordinator) | 
|  void | setupThread()Sets the current RI up as the ServiceSerializationSupport. | 
|  void | shutdown()Invokes ShutdownCoordinator.shutdown(), then releases the coordinator, modules and
 variable sources. | 
|  void | startup()Starts up the Registry after all service and configuration points have been defined. | 
|  java.lang.String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public RegistryInfrastructureImpl(ErrorHandler errorHandler,
                                  java.util.Locale locale)
| Method Detail | 
|---|
public java.util.Locale getLocale()
RegistryInfrastructure
getLocale in interface RegistryInfrastructurepublic void addModule(Module module)
public void addServicePoint(ServicePoint point)
public void addConfigurationPoint(ConfigurationPoint point)
public ServicePoint getServicePoint(java.lang.String serviceId,
                                    Module module)
RegistryInfrastructure
getServicePoint in interface RegistryInfrastructureserviceId - 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)RegistryInfrastructure.getServicePoint(java.lang.String, org.apache.hivemind.internal.Module)
public java.lang.Object getService(java.lang.String serviceId,
                                   java.lang.Class serviceInterface,
                                   Module module)
RegistryInfrastructure
getService in interface RegistryInfrastructureserviceId - 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)
public java.lang.Object getService(java.lang.Class serviceInterface,
                                   Module module)
RegistryInfrastructure
getService in interface RegistryInfrastructureserviceInterface - used to locate the servicemodule - the referencing module, used for visibility checks. If null, then only public
            service points will be considered.
public ConfigurationPoint getConfigurationPoint(java.lang.String configurationId,
                                                Module module)
RegistryInfrastructure
getConfigurationPoint in interface RegistryInfrastructureconfigurationId - 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)
public java.lang.Object getConfiguration(java.lang.String configurationId,
                                         Module module)
RegistryInfrastructure
getConfiguration in interface RegistryInfrastructureconfigurationId - 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)
public java.lang.Object getConfiguration(java.lang.Class configurationType,
                                         Module module)
RegistryInfrastructure
getConfiguration in interface RegistryInfrastructureconfigurationType - the configuration typemodule - the referencing module, used for visibility checks (null means no module, which
            requires that the configuration be public)
RegistryInfrastructure.getConfiguration(java.lang.Class, org.apache.hivemind.internal.Module)public java.lang.String toString()
toString in class java.lang.Objectpublic void setShutdownCoordinator(ShutdownCoordinator coordinator)
public void shutdown()
ShutdownCoordinator.shutdown(), then releases the coordinator, modules and
 variable sources.
shutdown in interface RegistryInfrastructurepublic void startup()
 This instance is stored into
 ServiceSerializationHelper.setServiceSerializationSupport(ServiceSerializationSupport).
 This may cause errors (and incorrect behavior) if multiple Registries exist in a single JVM.
 
 In addition, the service hivemind.Startup is obtained and run()
 is invoked on it. This allows additional startup, provided in the
 hivemind.Startup configuration point, to be executed.
startup in interface RegistryInfrastructurepublic ServiceModelFactory getServiceModelFactory(java.lang.String name)
RegistryInfrastructure
getServiceModelFactory in interface RegistryInfrastructurepublic void cleanupThread()
RegistryInfrastructureThreadEventNotifier.fireThreadCleanup().
cleanupThread in interface RegistryInfrastructure
public boolean containsConfiguration(java.lang.String configurationId,
                                     Module module)
RegistryInfrastructure
containsConfiguration in interface RegistryInfrastructureconfigurationId - to search formodule - the configuration must be visible to, or null for no module (the application's
            view
public boolean containsService(java.lang.Class serviceInterface,
                               Module module)
RegistryInfrastructure
containsService in interface RegistryInfrastructuremodule - the service must be visible to the module (or null for the application's view)
public boolean containsService(java.lang.String serviceId,
                               java.lang.Class serviceInterface,
                               Module module)
RegistryInfrastructure
containsService in interface RegistryInfrastructuremodule - the service must be visible to the module (or null for the application's view)
public ErrorHandler getErrorHander()
RegistryInfrastructureErrorHandler for this Registry.
getErrorHander in interface RegistryInfrastructurepublic java.lang.Object getServiceFromToken(ServiceToken token)
ServiceSerializationSupport
getServiceFromToken in interface ServiceSerializationSupportpublic ServiceToken getServiceTokenForService(java.lang.String serviceId)
ServiceSerializationSupportServiceToken corresponding to the indicated serviceId. A ServiceToken takes
 the place of a service (proxy) during serialization.
getServiceTokenForService in interface ServiceSerializationSupportpublic void setupThread()
setupThread in interface RegistryInfrastructureServiceSerializationHelper, 
ServiceSerializationSupportpublic Module getModule(java.lang.String moduleId)
RegistryInfrastructure
getModule in interface RegistryInfrastructurepublic java.util.List getServiceIds(java.lang.Class serviceInterface)
getServiceIds in interface RegistryInfrastructureRegistryInfrastructure.getServiceIds(java.lang.Class)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||