|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.impl.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.String |
expandSymbols(java.lang.String input,
Location location)
Expands any substitution symbols in the input string, replacing each symbol with the symbols value (if known). |
java.util.List |
getConfiguration(java.lang.String configurationId)
Returns a configuration as a List of elements (as defined by the schema for the configuration point, or as Element s if no configuration point does not define
a schema. |
java.util.Locale |
getLocale()
Returns the locale for which the registry was created. |
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. |
void |
shutdown()
Shuts down the registry; this notifies all RegistryShutdownListener services and objects. |
java.lang.String |
valueForSymbol(java.lang.String name)
Returns the value for the symbol, if this source can provide one. |
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 Registry
configurationId
-
public boolean containsService(java.lang.Class serviceInterface)
Registry
containsService
in interface Registry
serviceInterface
-
public boolean containsService(java.lang.String serviceId, java.lang.Class serviceInterface)
Registry
containsService
in interface Registry
serviceId
- serviceInterface
-
public java.util.List getConfiguration(java.lang.String configurationId)
Registry
Element
s if no configuration point does not define
a schema.
getConfiguration
in interface Registry
configurationId
- the fully qualified id of the configuration to obtain
public java.lang.String expandSymbols(java.lang.String input, Location location)
Registry
${
and }
delimiters) and an error is logged.
expandSymbols
in interface Registry
input
- input string to be converted, which may (or may not) contain any symbols.location
- the location from which the string was obtained, used if an error is logged.public java.lang.Object getService(java.lang.String serviceId, java.lang.Class serviceInterface)
Registry
getService
in interface Registry
serviceId
- 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 Registry
serviceInterface
- the class to which the service will be cast.
Registry.getService(String, Class)
public java.util.Locale getLocale()
Registry
getLocale
in interface Registry
public void shutdown()
Registry
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.
shutdown
in interface Registry
public void cleanupThread()
Registry
ThreadEventNotifier.fireThreadCleanup()
.
cleanupThread
in interface Registry
public java.lang.String valueForSymbol(java.lang.String name)
SymbolSource
valueForSymbol
in interface SymbolSource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |