KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quartz > listeners > SchedulerListenerSupport


1 /*
2  * Copyright 2004-2006 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 package org.quartz.listeners;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.quartz.SchedulerListener;
21 import org.quartz.Trigger;
22 import org.quartz.SchedulerException;
23
24 /**
25  * A helpful abstract base class for implementors of
26  * <code>{@link org.quartz.SchedulerListener}</code>.
27  *
28  * <p>
29  * The methods in this class are empty so you only need to override the
30  * subset for the <code>{@link org.quartz.SchedulerListener}</code> events
31  * you care about.
32  * </p>
33  *
34  * @see org.quartz.SchedulerListener
35  */

36 public abstract class SchedulerListenerSupport implements SchedulerListener {
37     private final Log log = LogFactory.getLog(getClass());
38
39     /**
40      * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
41      * class's category. This should be used by subclasses for logging.
42      */

43     protected Log getLog() {
44         return log;
45     }
46
47     public void jobScheduled(Trigger trigger) {
48     }
49
50     public void jobUnscheduled(String JavaDoc triggerName, String JavaDoc triggerGroup) {
51     }
52
53     public void triggerFinalized(Trigger trigger) {
54     }
55
56     public void triggersPaused(String JavaDoc triggerName, String JavaDoc triggerGroup) {
57     }
58
59     public void triggersResumed(String JavaDoc triggerName, String JavaDoc triggerGroup) {
60     }
61
62     public void jobsPaused(String JavaDoc jobName, String JavaDoc jobGroup) {
63     }
64
65     public void jobsResumed(String JavaDoc jobName, String JavaDoc jobGroup) {
66     }
67
68     public void schedulerError(String JavaDoc msg, SchedulerException cause) {
69     }
70
71     public void schedulerShutdown() {
72     }
73 }
74
Popular Tags