KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > scheduling > quartz > JobDetailAwareTrigger


1 /*
2  * Copyright 2002-2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy 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,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.scheduling.quartz;
18
19 import org.quartz.JobDetail;
20
21 /**
22  * Interface to be implemented by Quartz Triggers that are aware
23  * of the JobDetail object that they are associated with.
24  *
25  * <p>SchedulerFactoryBean will auto-detect Triggers that implement this
26  * interface and register them for the respective JobDetail accordingly.
27  *
28  * <p>The alternative is to configure a Trigger for a Job name and group:
29  * This involves the need to register the JobDetail object separately
30  * with SchedulerFactoryBean.
31  *
32  * @author Juergen Hoeller
33  * @since 18.02.2004
34  * @see SchedulerFactoryBean#setTriggers
35  * @see SchedulerFactoryBean#setJobDetails
36  * @see org.quartz.Trigger#setJobName
37  * @see org.quartz.Trigger#setJobGroup
38  */

39 public interface JobDetailAwareTrigger {
40
41     /**
42      * Return the JobDetail that this Trigger is associated with.
43      * @return the associated JobDetail, or <code>null</code> if none
44      */

45     JobDetail getJobDetail();
46
47 }
48
Popular Tags