org.quartz.examples
Class DumbRecoveryJob

java.lang.Object
  extended byorg.quartz.examples.DumbDelayJob
      extended byorg.quartz.examples.DumbRecoveryJob
All Implemented Interfaces:
Job
Direct Known Subclasses:
DumbRecoveryStatefulJob

public class DumbRecoveryJob
extends DumbDelayJob

A dumb implementation of Job, for unittesting purposes.

This jobs prints a different message if it detects that it is executing as a recovery. It pauses (sleeps) for a few seconds within its execute method, so that there's a good chance it will be running when a scheduler dies.

Author:
James House

Field Summary
 
Fields inherited from class org.quartz.examples.DumbDelayJob
DEFAULT_DELAY, KEY_DELAY
 
Constructor Summary
DumbRecoveryJob()
           
 
Method Summary
 void execute(JobExecutionContext context)
           Called by the Scheduler when a Trigger fires that is associated with the Job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumbRecoveryJob

public DumbRecoveryJob()
Method Detail

execute

public void execute(JobExecutionContext context)
             throws JobExecutionException

Called by the Scheduler when a Trigger fires that is associated with the Job.

Specified by:
execute in interface Job
Overrides:
execute in class DumbDelayJob
Throws:
JobExecutionException - if there is an exception while executing the job.

Quartz Project Page