|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.hivemind.internal
Interface Module

- All Superinterfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.SymbolSource
- public interface Module
- extends org.apache.hivemind.Locatable, org.apache.hivemind.SymbolSource
The definition of a HiveMind Module. A Module is a container of service extension points and configuration extension points. It also acts as a "gateway" so that services and configurations in other modules may be accessed.
Why do we expose the Module rather than the RegistryInfrastructure? It's more than just qualifying ids before passing them up to the RI. At some future point, a concept of visibility will be added to HiveMind. This will make many services and configurations private to the module which defines them and the necessary visibility filtering logic will be here.
| Method Summary | |
boolean |
containsService(java.lang.Class serviceInterface)
Returns true if a single service exists which implements the specified service interface and is visible to this module. |
java.lang.String |
expandSymbols(java.lang.String input,
org.apache.hivemind.Location location)
|
org.apache.hivemind.ClassResolver |
getClassResolver()
Returns the resource resolver for this module. |
java.util.List |
getConfiguration(java.lang.String configurationId)
Returns the java.util.List of elements for the specified configuration point. |
java.util.Map |
getConfigurationAsMap(java.lang.String configurationId)
Returns the elements of the given configuration point as an unmodifiable java.util.Map. |
org.apache.hivemind.ErrorHandler |
getErrorHandler()
Returns the org.apache.hivemind.ErrorHandler for this Registry. |
java.util.Locale |
getLocale()
|
org.apache.hivemind.Messages |
getMessages()
Returns an object that can provide and format localized messages for this module. |
java.lang.String |
getModuleId()
Returns the unique identifier for this module. |
java.lang.Object |
getService(java.lang.Class serviceInterface)
Finds a service that implements the provided interface. |
java.lang.Object |
getService(java.lang.String serviceId,
java.lang.Class serviceInterface)
Looks up the ServicePoint (throwing an exception if not found) and invokes ServicePoint.getService(Class) 55 . |
ServiceModelFactory |
getServiceModelFactory(java.lang.String name)
|
ServicePoint |
getServicePoint(java.lang.String serviceId)
Returns the identified service extension point. |
org.apache.hivemind.schema.Translator |
getTranslator(java.lang.String translator)
|
boolean |
isConfigurationMappable(java.lang.String configurationId)
Returns true if the elements contributed to the given configuration point can be retrieved as a Map 55 . |
java.lang.Class |
resolveType(java.lang.String type)
Returns the class matching the type. |
| Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
| Methods inherited from interface org.apache.hivemind.SymbolSource |
valueForSymbol |
| Method Detail |
getModuleId
public java.lang.String getModuleId()
- Returns the unique identifier for this module.
containsService
public boolean containsService(java.lang.Class serviceInterface)
- Returns true if a single service exists which implements the specified service interface and
is visible to this module.
- Since:
- 1.1
getService
public java.lang.Object getService(java.lang.String serviceId, java.lang.Class serviceInterface)
- Looks up the ServicePoint (throwing an exception if not found) and invokes
ServicePoint.getService(Class)55 .
getService
public java.lang.Object getService(java.lang.Class serviceInterface)
- Finds a service that implements the provided interface. Exactly one such service may exist or
an exception is thrown.
getServicePoint
public ServicePoint getServicePoint(java.lang.String serviceId)
- Returns the identified service extension point.
getConfiguration
public java.util.List getConfiguration(java.lang.String configurationId)
- Returns the java.util.List of elements for the specified configuration point. The
returned List is unmodifiable. It may be empty, but won't be null.
It is expressly the caller's job to sort the elements into an appropriate order (a copy will have to be made since the returned List is unmodifiable).
isConfigurationMappable
public boolean isConfigurationMappable(java.lang.String configurationId)
- Returns true if the elements contributed to the given configuration point can be
retrieved as a Map 55 .
- Since:
- 1.1
getConfigurationAsMap
public java.util.Map getConfigurationAsMap(java.lang.String configurationId)
- Returns the elements of the given configuration point as an unmodifiable java.util.Map. It may
be empty, but not null.
- Since:
- 1.1
getClassResolver
public org.apache.hivemind.ClassResolver getClassResolver()
- Returns the resource resolver for this module. The resource resolver is used to locate
classes by name (using the correct classloader).
resolveType
public java.lang.Class resolveType(java.lang.String type)
- Returns the class matching the type. First, attempts to resolve the type exactly as is. If
that fails, resolves the type within the module's defined package.
- Since:
- 1.1
getMessages
public org.apache.hivemind.Messages getMessages()
- Returns an object that can provide and format localized messages for this module. The
messages come from a properties file,
hivemodule.properties(localized) stored with the HiveMind deployment descriptor in the META-INF folder.
getTranslator
public org.apache.hivemind.schema.Translator getTranslator(java.lang.String translator)
getServiceModelFactory
public ServiceModelFactory getServiceModelFactory(java.lang.String name)
getLocale
public java.util.Locale getLocale()
expandSymbols
public java.lang.String expandSymbols(java.lang.String input, org.apache.hivemind.Location location)
getErrorHandler
public org.apache.hivemind.ErrorHandler getErrorHandler()
- Returns the org.apache.hivemind.ErrorHandler for this Registry.
|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC