org.mmbase.applications.crontab.modules
Class CrontabModule

java.lang.Object
  extended byorg.mmbase.util.functions.FunctionProvider
      extended byorg.mmbase.module.Module
          extended byorg.mmbase.module.ReloadableModule
              extended byorg.mmbase.module.WatchedReloadableModule
                  extended byorg.mmbase.applications.crontab.modules.CrontabModule

public class CrontabModule
extends WatchedReloadableModule

Starts a crontab for MMBase as a Module.

Version:
$Id: CrontabModule.java,v 1.6 2006/01/20 08:19:10 michiel Exp $
Author:
Michiel Meeuwissen

Field Summary
protected  Function aliveFunction
           
protected  CronDaemon cronDaemon
           
protected static Parameter ENTRY
           
protected  Function interruptFunction
           
protected  Function kickFunction
           
protected  Function listFunction
           
protected  Function reloadFunction
           
protected  Function startFunction
           
protected  Function stopFunction
           
protected static Parameter THREAD
           
 
Fields inherited from class org.mmbase.module.Module
getMaintainerFunction, getVersionFunction
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
CrontabModule()
           
 
Method Summary
protected  void addJob(Map.Entry entry)
           
 void init()
          Interpretates all initParameters as crontab entries.
 void readMoreJobs()
           
 void reload()
          All previously added entries are removed from the cron-daemon and the currently configured ones are added (init is called).
protected  void shutdown()
          Shuts down the module.
 
Methods inherited from class org.mmbase.module.WatchedReloadableModule
onload
 
Methods inherited from class org.mmbase.module.ReloadableModule
reloadConfiguration, reloadConfiguration
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, maintainance, setInitParameter, setMaintainer, setName, setVersion, 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
 

Field Detail

cronDaemon

protected CronDaemon cronDaemon

listFunction

protected Function listFunction
Since:
MMBase-1.8

ENTRY

protected static final Parameter ENTRY

THREAD

protected static final Parameter THREAD

kickFunction

protected Function kickFunction
Since:
MMBase-1.8

interruptFunction

protected Function interruptFunction
Since:
MMBase-1.8

aliveFunction

protected Function aliveFunction
Since:
MMBase-1.8

stopFunction

protected Function stopFunction
Since:
MMBase-1.8

startFunction

protected Function startFunction
Since:
MMBase-1.8

reloadFunction

protected Function reloadFunction
Since:
MMBase-1.8
Constructor Detail

CrontabModule

public CrontabModule()
Method Detail

init

public void init()
Interpretates all initParameters as crontab entries. The key is not very important but must be unique. The value are actually two or three or four values, separated by tabs newlines or '|', whatever you like most.
      <cron time>
      <class name of a CronJob>
      [<description>]
      [<configuration-string>]
      

Overrides:
init in class Module

shutdown

protected void shutdown()
Description copied from class: Module
Shuts down the module. This method is called by shutdownModules.

Overrides:
shutdown in class Module

addJob

protected void addJob(Map.Entry entry)

reload

public void reload()
All previously added entries are removed from the cron-daemon and the currently configured ones are added (init is called).

Specified by:
reload in class ReloadableModule

readMoreJobs

public void readMoreJobs()


MMBase build 1.8.1.20060716