|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.hivemind.impl.RegistryImpl
Implementation of Registry
.
Constructor Summary | |
RegistryImpl(ErrorHandler errorHandler,
java.util.Locale locale)
|
Method Summary | |
void |
addConfigurationPoint(ConfigurationPoint point)
|
void |
addServicePoint(ServicePoint point)
|
void |
cleanupThread()
Convienience for invoking ThreadEventNotifier.fireThreadCleanup() . |
java.lang.String |
expandSymbols(java.lang.String text,
Location location)
Note: a little cut-n-paste from org.apache.tapestry.script.AbstractTokenRule . |
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. |
ConfigurationPoint |
getConfigurationPoint(java.lang.String configurationId)
Returns the configuration point. |
ErrorHandler |
getErrorHander()
Returns the ErrorHandler for this Registry. |
java.util.Locale |
getLocale()
Returns the locale for which the registry was created. |
java.lang.Object |
getService(java.lang.String serviceId,
java.lang.Class serviceInterface)
Obtains a service from the registry. |
ServiceModelFactory |
getServiceModelFactory(java.lang.String name)
Returns a named service-model factory |
ServicePoint |
getServicePoint(java.lang.String serviceId)
Returns the identified service extension point. |
Translator |
getTranslator(java.lang.String constructor)
Gets a Translator instance. |
void |
setLocale(java.util.Locale locale)
|
void |
setShutdownCoordinator(ShutdownCoordinator coordinator)
|
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()
|
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, wait, wait, wait |
Constructor Detail |
public RegistryImpl(ErrorHandler errorHandler, java.util.Locale locale)
Method Detail |
public java.util.Locale getLocale()
Registry
getLocale
in interface Registry
public void addServicePoint(ServicePoint point)
public void addConfigurationPoint(ConfigurationPoint point)
public ServicePoint getServicePoint(java.lang.String serviceId)
RegistryInfrastructure
getServicePoint
in interface RegistryInfrastructure
serviceId
- fully qualified id of the service pointpublic 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 ConfigurationPoint getConfigurationPoint(java.lang.String configurationId)
RegistryInfrastructure
getConfigurationPoint
in interface RegistryInfrastructure
configurationId
- the fully qualified id of the configuration
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 toString()
toString
in class java.lang.Object
public java.lang.String expandSymbols(java.lang.String text, Location location)
org.apache.tapestry.script.AbstractTokenRule
.
expandSymbols
in interface Registry
text
- 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.String valueForSymbol(java.lang.String name)
SymbolSource
valueForSymbol
in interface SymbolSource
public void setShutdownCoordinator(ShutdownCoordinator coordinator)
public void shutdown()
ShutdownCoordinator.shutdown()
, then releases
the coordinator, modules and variable sources.
shutdown
in interface Registry
public void startup()
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.
public ServiceModelFactory getServiceModelFactory(java.lang.String name)
RegistryInfrastructure
getServiceModelFactory
in interface RegistryInfrastructure
public Translator getTranslator(java.lang.String constructor)
RegistryInfrastructure
Translator
instance. The Translator may be a shared, cached
instance (Translators should be stateless). Translators are identified by a constructor, which
may be the name of a translator defined in the hivemind.Translators
extension point (a single builtin translator, class
,
is hardcoded). Alternately, the name may consist of a translator name, a comma, and an
initializer string for the service (example: int,min=5
).
getTranslator
in interface RegistryInfrastructure
Translator
instancepublic void cleanupThread()
Registry
ThreadEventNotifier.fireThreadCleanup()
.
cleanupThread
in interface Registry
public void setLocale(java.util.Locale locale)
public ErrorHandler getErrorHander()
RegistryInfrastructure
ErrorHandler
for this Registry.
getErrorHander
in interface RegistryInfrastructure
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |