net.jetrix.services
Class CronService

java.lang.Object
  extended by net.jetrix.services.AbstractService
      extended by 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

Field Summary
protected  String pattern
           
 
Fields inherited from class net.jetrix.services.AbstractService
autoStart, log
 
Constructor Summary
CronService()
           
 
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 net.jetrix.services.AbstractService
isAutoStart, setAutoStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.jetrix.Service
getName
 

Field Detail

pattern

protected String pattern
Constructor Detail

CronService

public CronService()
Method Detail

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.