fr.ifremer.isisfish.cron
Class CronService

java.lang.Object
  extended by java.lang.Thread
      extended by fr.ifremer.isisfish.cron.CronService
All Implemented Interfaces:
java.lang.Runnable

public class CronService
extends java.lang.Thread

Main cron service job.

Version:
$Revision: 2868 $ Last update : $Date: 2010-01-04 16:49:25 +0100 (lun., 04 janv. 2010) $ By : $Author$
Author:
chatellier

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.util.Collection<java.lang.Runnable> services
          Registered services.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CronService()
          Init cron service with default available services.
 
Method Summary
protected  void addService(java.lang.Runnable task)
          Add a new task for execution.
 void run()
          Run all registered services once and stop.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

services

protected java.util.Collection<java.lang.Runnable> services
Registered services.

Constructor Detail

CronService

public CronService()
Init cron service with default available services.

Method Detail

addService

protected void addService(java.lang.Runnable task)
Add a new task for execution.

Parameters:
task - task to add

run

public void run()
Run all registered services once and stop. This behavior may change later to run as a real cron service.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 1999-2010 CodeLutin. All Rights Reserved.