org.quartz.examples.example4
Class ColorJob

java.lang.Object
  extended by org.quartz.examples.example4.ColorJob
All Implemented Interfaces:
Job, StatefulJob

public class ColorJob
extends Object
implements StatefulJob

This is just a simple job that receives parameters and maintains state

Author:
Bill Kratzer

Field Summary
static String EXECUTION_COUNT
           
static String FAVORITE_COLOR
           
 
Constructor Summary
ColorJob()
           Empty constructor for job initilization
 
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
 

Field Detail

FAVORITE_COLOR

public static final String FAVORITE_COLOR
See Also:
Constant Field Values

EXECUTION_COUNT

public static final String EXECUTION_COUNT
See Also:
Constant Field Values
Constructor Detail

ColorJob

public ColorJob()

Empty constructor for job initilization

Quartz requires a public empty constructor so that the scheduler can instantiate the class whenever it needs.

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
Throws:
JobExecutionException - if there is an exception while executing the job.


Copyright © 2010. All Rights Reserved.