|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The fundamental software component in the Anagram framework.
The Anagram server is a hierarchical collection of modules that communicate with each other and exchange various temporary objects in order to handle servlet requests. Each module encapsulates a portion of the server's functionality.
Modules are distinct from other Anagram classes in that they:
Method Summary | |
void |
configure(Setting setting)
Configures the module according to the settings provided. |
java.lang.String |
getModuleID()
Returns an ID for this module. |
java.lang.String |
getModuleName()
Returns the complete name of the module, including parents. |
void |
init(Server server,
Module parent)
Initializes the module. |
Method Detail |
public java.lang.String getModuleName()
complete_name : [parents] module_id
parents : [parents] parent '/'
The complete module name is used as an identifier in log messages.
public java.lang.String getModuleID()
public void init(Server server, Module parent)
This method should copy the server and parent references provided to internal fields, so that the module has access to the rest of the module hierarchy, and then call the init() method of any sub-modules. It can also be used to perform any one-time initialization that requires access to other modules.
This method will only be called once, immediately after the module is created, and before it is configured for the first time. Thus it does not need to be thread-safe.
public void configure(Setting setting) throws ConfigException
This method is guaranteed to be called at least once before any requests are sent to the module. The server supports dynamic reconfiguration, and thus this method may be called any number of times during the life of the module. However, it is guaranteed that this method will never be called while a servlet request is being processed. Thus it does not need to be thread-safe.
If this module contains other modules, it is responsible for configuring them using the appropriate sub-settings. Each module should receive the sub-setting that matches its module ID, so that the XML tags in the configuration file match up with the module names in the log file.
ConfigException
- If the module is unable to operate using
the settings provided. This will halt the server's operation, and
thus should only be thrown if there is no reasonable default
that can be used in place of a missing or invalid setting.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |