|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.Parameterized
fedora.server.Pluggable
fedora.server.Module
public abstract class Module
Base class for Fedora server modules.
A Module is a singleton object of a Fedora Server
instance with a simple lifecycle, supported by the initModule()
and shutdownModule() methods, which are automatically called
during server startup and shutdown, respectively.
Modules are configured via "param" elements inside module elements
in the configuration file. An instance of each module specified in the
configuration file is automatically created at startup and is available
via the getModule(String) instance method of the
Server class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface fedora.common.Constants |
|---|
Constants.FedoraHome |
| Field Summary |
|---|
| Fields inherited from interface fedora.common.Constants |
|---|
ACTION, BDEF, BMECH, DATASTREAM, DC, DISSEMINATOR, ENVIRONMENT, FEDORA, FEDORA_HOME, FEDORA_SYSTEM_DEF_PID, FEDORA_SYSTEM_DEF_URI, HTTP_REQUEST, MODEL, OBJECT, RDF, RECOVERY, RELS_EXT, RESOURCE, SUBJECT, TUCANA, VIEW, XSD |
| Constructor Summary | |
|---|---|
Module(java.util.Map moduleParameters,
Server server,
java.lang.String role)
Creates and initializes the Module. |
|
| Method Summary | |
|---|---|
java.lang.String |
getRole()
Gets the role this module fulfills, as given in the constructor. |
Server |
getServer()
Gets the Server instance to which this Module
belongs. |
void |
initModule()
Initializes the Module based on configuration parameters. |
void |
postInitModule()
Second stage of Module initialization. |
void |
shutdownModule()
Frees system resources allocated by this Module. |
| Methods inherited from class fedora.server.Pluggable |
|---|
getHelp, getOptionalParameters, getParameterHelp, getRequiredModuleRoles, getRequiredParameters |
| Methods inherited from class fedora.server.Parameterized |
|---|
getParameter, getParameter, getParameters, parameterNames, setParameter, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Module(java.util.Map moduleParameters,
Server server,
java.lang.String role)
throws ModuleInitializationException
moduleParameters - A pre-loaded Map of name-value pairs comprising
the intended configuration of this Module.server - The Server instance.role - The role this module fulfills, a java class name.
ModuleInitializationException - If initilization values are
invalid or initialization fails for some other reason.| Method Detail |
|---|
public Server getServer()
Server instance to which this Module
belongs.
Server instance.public final java.lang.String getRole()
Module extends or implements.
public void initModule()
throws ModuleInitializationException
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
public void postInitModule()
throws ModuleInitializationException
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
public void shutdownModule()
throws ModuleShutdownException
ModuleShutdownException - If there is a problem freeing
system resources. Note that if there is a problem, it won't end
up aborting the shutdown process. Therefore, this method should
do everything possible to recover from exceptional situations
before throwing an exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||