|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.module.Module
Module , the wrapper for the modules.
| Constructor Summary | |
Module()
|
|
| Method Summary | |
java.lang.String |
getClassName()
return classname of this builder |
java.lang.String |
getInitParameter(java.lang.String key)
Gets his init-parameters |
java.util.Hashtable |
getInitParameters()
Gets own modules properties |
java.lang.String |
getMaintainer()
|
java.lang.String |
getMimeType(java.lang.String ext)
getMimeType: Returns the mimetype using ServletContext.getServletContext which returns the servlet context which is set when servscan is loaded. |
java.lang.String |
getMimeTypeFile(java.lang.String filename)
|
static java.lang.Object |
getModule(java.lang.String name)
Retrieves a reference to a Module. |
static java.lang.Object |
getModule(java.lang.String name,
boolean startOnLoad)
Retrieves a reference to a Module. |
java.lang.String |
getModuleInfo()
provide some info on the module |
static java.util.Iterator |
getModules()
Returns an iterator of all the modules that are currently active. |
java.lang.String |
getName()
Returns the name of the module |
protected java.util.Hashtable |
getProperties(java.lang.String propertytable)
Returns the properties to the subclass. |
protected java.lang.String |
getProperty(java.lang.String name,
java.lang.String var)
Returns one propertyvalue to the subclass. |
int |
getVersion()
|
boolean |
hasStarted()
Returns whether the module has started (has been initialized or is in its initialization fase). |
abstract void |
init()
Initializes the module. |
static java.util.Hashtable |
loadModulesFromDisk()
|
void |
maintainance()
maintainance call called by the admin module every x seconds. |
abstract void |
onload()
|
void |
setClassName(java.lang.String d)
set classname of the builder |
void |
setInitParameter(java.lang.String key,
java.lang.String value)
|
void |
setMaintainer(java.lang.String m)
|
void |
setName(java.lang.String name)
|
void |
setVersion(int v)
|
void |
shutdown()
Shuts down the module. |
static void |
shutdownModules()
Calls shutdown of all registered modules. |
void |
startModule()
Starts the module. |
static void |
startModules()
|
java.util.Hashtable |
state()
state, returns the state hashtable that is/can be used to debug. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Module()
| Method Detail |
public final void setName(java.lang.String name)
public final void startModule()
init() of a module exactly once.
In other words, once the init() is called, it does not call it again.
This method is final and cannot be overridden.
It is used to safely intilaize modules during startup, amd allows other modules
to force the 'startup' of another module without risk.public final boolean hasStarted()
public abstract void init()
startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.public abstract void onload()
public void shutdown()
public java.util.Hashtable state()
public void setInitParameter(java.lang.String key,
java.lang.String value)
public java.lang.String getInitParameter(java.lang.String key)
protected java.util.Hashtable getProperties(java.lang.String propertytable)
protected java.lang.String getProperty(java.lang.String name,
java.lang.String var)
public java.util.Hashtable getInitParameters()
public static final java.util.Iterator getModules()
null if no attempt has the modules have (not) yet been to loaded.
Unlike getModule(java.lang.String), this method does not automatically load modules if this hadn't occurred yet.Iterator with all active modulespublic final java.lang.String getName()
public java.lang.String getModuleInfo()
public void maintainance()
public java.lang.String getMimeType(java.lang.String ext)
ext - A String containing the extension.public java.lang.String getMimeTypeFile(java.lang.String filename)
public static final void startModules()
public static final void shutdownModules()
public static java.lang.Object getModule(java.lang.String name)
name - the name of the module to retrieveModule, or null if the
module does not exist or is inactive.
public static java.lang.Object getModule(java.lang.String name,
boolean startOnLoad)
startOnLoad to true,
this call ensures that the requested module has been initialized by
calling the startModule() method.
This is needed if you need to call Module methods from the init() of
another module.
XXX: return type Object in stead of Module?name - the name of the module to retrievestartOnLoad - whetehr to make sure the module has been staretd or not.Module, or null if the
module does not exist or is inactive.public java.lang.String getMaintainer()
public void setMaintainer(java.lang.String m)
public void setVersion(int v)
public int getVersion()
public void setClassName(java.lang.String d)
public java.lang.String getClassName()
public static java.util.Hashtable loadModulesFromDisk()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||