|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.lt.hog.Registry
public class Registry
Registry
provides methods to store and retrieve Module
s in a central hashmap. This class is realised using a
singelton pattern since there can only be exactly one instance of
Registry
. This class is the local registry in contrast
to the (public) rmi registry.
Method Summary | |
---|---|
static Registry |
getInstance()
This controlls the access to the instance of Registry . |
java.util.HashMap |
getModuleNames()
This returns the hash map that maps class names to module names. |
java.util.HashMap |
getModules()
This returns the hash map that maps module names to the modules. |
void |
registerModule(Module aModule)
This registers aModule using the name of the module as
defined in the module as key. |
Module |
retrieveModuleViaClass(java.lang.String aModClass)
This retrieves the Module that is an instance of the
class with name aModClass . |
Module |
retrieveModuleViaName(java.lang.String aModName)
This retrieves the Module stored under the module name
aModName . |
void |
setModuleNames(java.util.HashMap aHashMap)
This sets the module names. |
void |
unregisterModule(Module aModule)
This unregisters aModule . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Registry getInstance()
Registry
.
Registry
public java.util.HashMap getModules()
HashMap
with modulespublic java.util.HashMap getModuleNames()
Launcher
communicates
with the Registry
via class names.
HashMap
with the module namespublic void setModuleNames(java.util.HashMap aHashMap)
aHashMap
- a HashMap
with the module namespublic void registerModule(Module aModule)
aModule
using the name of the module as
defined in the module as key.
aModule
- a Module
public void unregisterModule(Module aModule)
aModule
.
aModule
- a Module
public Module retrieveModuleViaName(java.lang.String aModName) throws NoSuchModuleException
Module
stored under the module name
aModName
. This method is used by
the Agents to retrieve modules from the registry.
aModName
- a String
that is used as key
Module
stored under that name
NoSuchModuleException
- if requested module doesn't
exist in the registrypublic Module retrieveModuleViaClass(java.lang.String aModClass) throws NoSuchModuleException
Module
that is an instance of the
class with name aModClass
. This method is used by
the Launcher
to retrieve modules from the registry.
aModClass
- a String
with the class name
NoSuchModuleException
- if requested module doesn't
exist in the registry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |