org.mmbase.module
Class ReloadableModule

java.lang.Object
  extended byorg.mmbase.util.functions.FunctionProvider
      extended byorg.mmbase.module.Module
          extended byorg.mmbase.module.ReloadableModule
Direct Known Subclasses:
WatchedReloadableModule

public abstract class ReloadableModule
extends Module

A Reloadable Module has a 'reload' method. You can extend your own modules from this. If you need to happen the reload automaticly, then WatchedReloadableModule.

Since:
MMBase-1.8
Version:
$Id: ReloadableModule.java,v 1.9 2005/10/09 14:55:03 ernst Exp $
Author:
Michiel Meeuwissen

Field Summary
 
Fields inherited from class org.mmbase.module.Module
getMaintainerFunction, getVersionFunction
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
ReloadableModule()
           
 
Method Summary
abstract  void reload()
          This method should be called when the module should be reloaded.
protected  boolean reloadConfiguration(ModuleReader parser)
           
protected  boolean reloadConfiguration(String moduleName)
          Reloads the configuration file.
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, init, maintainance, onload, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReloadableModule

public ReloadableModule()
Method Detail

reloadConfiguration

protected boolean reloadConfiguration(String moduleName)
Reloads the configuration file. The module cannot change class, so if you change that in the XML, an error is logged, and nothing will happen. This method should be called from your extension if and when the configuration must be reloaded.

Returns:
Whether successful.

reloadConfiguration

protected boolean reloadConfiguration(ModuleReader parser)

reload

public abstract void reload()
This method should be called when the module should be reloaded.



MMBase build 1.8.1.20060716