|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.Parameterized
org.fcrepo.server.Pluggable
org.fcrepo.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 org.fcrepo.common.Constants |
|---|
Constants.FedoraHome |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Module(Map<String,String> moduleParameters,
Server server,
String role)
Creates and initializes the Module. |
|
| Method Summary | |
|---|---|
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 org.fcrepo.server.Pluggable |
|---|
getHelp, getOptionalParameters, getParameterHelp, getRequiredModuleRoles, getRequiredParameters |
| Methods inherited from class org.fcrepo.server.Parameterized |
|---|
getParameter, getParameter, getParameter, getParameterList, getParameters, getParameters, parameterNames, setParameter, setParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Module(Map<String,String> moduleParameters,
Server server,
String role)
throws ModuleInitializationException
When the server is starting up, this is invoked as part of the initialization process.
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 String getRole()
Role is the name of the class or interface that this concrete
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 | |||||||||