01: /*
02: * Copyright 2004-2006 OpenSymphony
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy
06: * of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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
37: SchedulerListener {
38: private final Log log = LogFactory.getLog(getClass());
39:
40: /**
41: * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
42: * class's category. This should be used by subclasses for logging.
43: */
44: protected Log getLog() {
45: return log;
46: }
47:
48: public void jobScheduled(Trigger trigger) {
49: }
50:
51: public void jobUnscheduled(String triggerName, String triggerGroup) {
52: }
53:
54: public void triggerFinalized(Trigger trigger) {
55: }
56:
57: public void triggersPaused(String triggerName, String triggerGroup) {
58: }
59:
60: public void triggersResumed(String triggerName, String triggerGroup) {
61: }
62:
63: public void jobsPaused(String jobName, String jobGroup) {
64: }
65:
66: public void jobsResumed(String jobName, String jobGroup) {
67: }
68:
69: public void schedulerError(String msg, SchedulerException cause) {
70: }
71:
72: public void schedulerShutdown() {
73: }
74: }
|