|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The HiveMind registry; primarily this is used to gain access to services.
In addition, Registry implements SymbolSource
which allows programatic access to substitution symbols.
Method Summary | |
void |
cleanupThread()
Convienience for invoking ThreadEventNotifier.fireThreadCleanup() . |
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. |
Methods inherited from interface org.apache.hivemind.SymbolSource |
valueForSymbol |
Method Detail |
public java.util.List getConfiguration(java.lang.String configurationId)
Element
s if no configuration point
does not define a schema.
configurationId
- the fully qualified id of the configuration to obtain
ApplicationRuntimeException
- if the configuration does not exist, etc.public java.lang.String expandSymbols(java.lang.String input, Location location)
${
and }
delimiters) and an error is logged.
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)
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 interfacepublic java.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)
public java.util.Locale getLocale()
public 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.
public void cleanupThread()
ThreadEventNotifier.fireThreadCleanup()
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |