net.jetrix.services
Class CronService
java.lang.Object
net.jetrix.services.AbstractService
net.jetrix.services.CronService
- All Implemented Interfaces:
- Service
- Direct Known Subclasses:
- VersionService
public abstract class CronService
- extends AbstractService
A service running a task at a fixed date. Services extending this service
expect a pattern parameter setting the execution time, this pattern
uses the cron format of Unix systems extended with a 6th field for the year
(see http://www.nncron.ru/nncronlt/help/EN/working/cron-format.htm).
- Since:
- 0.2
- Version:
- $Revision: 558 $, $Date: 2005-01-09 19:48:58 +0100 (dim., 09 janv. 2005) $
- Author:
- Emmanuel Bourg
Method Summary |
protected void |
init()
Initialization performed before the timer is started. |
boolean |
isRunning()
Tell if the service is currently running. |
protected abstract void |
run()
Do the task |
void |
setPattern(String pattern)
|
void |
start()
Start the service. |
void |
stop()
Stop the service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pattern
protected String pattern
CronService
public CronService()
setPattern
public void setPattern(String pattern)
init
protected void init()
- Initialization performed before the timer is started.
start
public void start()
- Description copied from interface:
Service
- Start the service.
stop
public void stop()
- Description copied from interface:
Service
- Stop the service.
isRunning
public boolean isRunning()
- Description copied from interface:
Service
- Tell if the service is currently running.
run
protected abstract void run()
- Do the task
Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.