uws.job
Class AbstractJob.MyTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by uws.job.AbstractJob.MyTimerTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
AbstractJob

protected final class AbstractJob.MyTimerTask
extends java.util.TimerTask

Definition of a task that a timer of AbstractJob must execute.

Note: This class is very usefull because it lets re-initializing the timers of an AbstractJob after a Tomcat restart. Indeed a TimerTask is not serializable. This problem can be resolved by using this extension of the TimerTask class because all its execution part is fully managed by a JobTimerTask instance which is serializable and saved in the concerned AbstractJob instance.

Version:
12/2010
Author:
Grégory Mantelet (CDS)

Field Summary
protected  JobTimerTask task
           
 
Constructor Summary
AbstractJob.MyTimerTask(JobTimerTask t)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

task

protected final JobTimerTask task
Constructor Detail

AbstractJob.MyTimerTask

public AbstractJob.MyTimerTask(JobTimerTask t)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask