KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quartz > spi > TriggerFiredBundle


1 /*
2  * Copyright 2004-2005 OpenSymphony
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy
6  * of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations
14  * under the License.
15  *
16  */

17
18 /*
19  * Previously Copyright (c) 2001-2004 James House
20  */

21 package org.quartz.spi;
22
23 import java.util.Date JavaDoc;
24
25 import org.quartz.Calendar;
26 import org.quartz.JobDetail;
27 import org.quartz.Trigger;
28
29 /**
30  * <p>
31  * A simple class (structure) used for returning execution-time data from the
32  * JobStore to the <code>QuartzSchedulerThread</code>.
33  * </p>
34  *
35  * @see org.quartz.core.QuartzScheduler
36  *
37  * @author James House
38  */

39 public class TriggerFiredBundle implements java.io.Serializable JavaDoc {
40
41     /*
42      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43      *
44      * Data members.
45      *
46      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47      */

48
49     private JobDetail job;
50
51     private Trigger trigger;
52
53     private Calendar cal;
54
55     private boolean jobIsRecovering;
56
57     private Date JavaDoc fireTime;
58
59     private Date JavaDoc scheduledFireTime;
60
61     private Date JavaDoc prevFireTime;
62
63     private Date JavaDoc nextFireTime;
64
65     /*
66      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67      *
68      * Constructors.
69      *
70      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71      */

72
73     public TriggerFiredBundle(JobDetail job, Trigger trigger, Calendar cal,
74             boolean jobIsRecovering, Date JavaDoc fireTime, Date JavaDoc scheduledFireTime,
75             Date JavaDoc prevFireTime, Date JavaDoc nextFireTime) {
76         this.job = job;
77         this.trigger = trigger;
78         this.cal = cal;
79         this.jobIsRecovering = jobIsRecovering;
80         this.fireTime = fireTime;
81         this.scheduledFireTime = scheduledFireTime;
82         this.prevFireTime = prevFireTime;
83         this.nextFireTime = nextFireTime;
84     }
85
86     /*
87      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88      *
89      * Interface.
90      *
91      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92      */

93
94     public JobDetail getJobDetail() {
95         return job;
96     }
97
98     public Trigger getTrigger() {
99         return trigger;
100     }
101
102     public Calendar getCalendar() {
103         return cal;
104     }
105
106     public boolean isRecovering() {
107         return jobIsRecovering;
108     }
109
110     /**
111      * @return Returns the fireTime.
112      */

113     public Date JavaDoc getFireTime() {
114         return fireTime;
115     }
116
117     /**
118      * @return Returns the nextFireTime.
119      */

120     public Date JavaDoc getNextFireTime() {
121         return nextFireTime;
122     }
123
124     /**
125      * @return Returns the prevFireTime.
126      */

127     public Date JavaDoc getPrevFireTime() {
128         return prevFireTime;
129     }
130
131     /**
132      * @return Returns the scheduledFireTime.
133      */

134     public Date JavaDoc getScheduledFireTime() {
135         return scheduledFireTime;
136     }
137
138 }
Popular Tags