1 package org.apache.stratum.scheduler.examplejobs;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 import java.util.Date;
21
22 import org.quartz.Job;
23 import org.quartz.JobExecutionContext;
24 import org.quartz.JobExecutionException;
25
26 /***
27 * <p>
28 * A dumb implementation of Job, for unittesting purposes.
29 * </p>
30 *
31 * @author James House
32 */
33 public class JobOne
34 implements Job
35 {
36
37
38
39
40
41 public JobOne()
42 {
43 }
44
45
46
47
48
49
50
51 /***
52 * <p>
53 * Called by the <code>{@link org.quartz.Scheduler}</code> when a <code>{@link org.quartz.Trigger}</code> fires that is
54 * associated with the <code>Job</code>.
55 * </p>
56 *
57 * @param context TODO: DOCUMENT ME!
58 *
59 * @throws JobExecutionException if there is an exception while executing the job.
60 */
61 public void execute(JobExecutionContext context)
62 throws JobExecutionException
63 {
64 System.out.println(" --- Testing Scheduler Component\n --- " + context.getJobDetail().getFullName() + " executed.["
65 + new Date() + "]");
66 }
67 }