001: /*
002: * Copyright 2004-2005 OpenSymphony
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005: * use this file except in compliance with the License. You may obtain a copy
006: * of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013: * License for the specific language governing permissions and limitations
014: * under the License.
015: *
016: */
017:
018: /*
019: * Previously Copyright (c) 2001-2004 James House
020: */
021: package org.quartz.impl;
022:
023: import java.util.Date;
024: import java.util.List;
025: import java.util.Set;
026:
027: import org.quartz.Calendar;
028: import org.quartz.JobDataMap;
029: import org.quartz.JobDetail;
030: import org.quartz.JobListener;
031: import org.quartz.Scheduler;
032: import org.quartz.SchedulerContext;
033: import org.quartz.SchedulerException;
034: import org.quartz.SchedulerListener;
035: import org.quartz.SchedulerMetaData;
036: import org.quartz.Trigger;
037: import org.quartz.TriggerListener;
038: import org.quartz.UnableToInterruptJobException;
039: import org.quartz.core.QuartzScheduler;
040: import org.quartz.core.SchedulingContext;
041: import org.quartz.spi.JobFactory;
042:
043: /**
044: * <p>
045: * An implementation of the <code>Scheduler</code> interface that directly
046: * proxies all method calls to the equivalent call on a given <code>QuartzScheduler</code>
047: * instance.
048: * </p>
049: *
050: * @see org.quartz.Scheduler
051: * @see org.quartz.core.QuartzScheduler
052: * @see org.quartz.core.SchedulingContext
053: *
054: * @author James House
055: */
056: public class StdScheduler implements Scheduler {
057:
058: /*
059: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
060: *
061: * Data members.
062: *
063: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
064: */
065:
066: private QuartzScheduler sched;
067:
068: private SchedulingContext schedCtxt;
069:
070: /*
071: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
072: *
073: * Constructors.
074: *
075: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
076: */
077:
078: /**
079: * <p>
080: * Construct a <code>StdScheduler</code> instance to proxy the given
081: * <code>QuartzScheduler</code> instance, and with the given <code>SchedulingContext</code>.
082: * </p>
083: */
084: public StdScheduler(QuartzScheduler sched,
085: SchedulingContext schedCtxt) {
086: this .sched = sched;
087: this .schedCtxt = schedCtxt;
088: }
089:
090: /*
091: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
092: *
093: * Interface.
094: *
095: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
096: */
097:
098: /**
099: * <p>
100: * Returns the name of the <code>Scheduler</code>.
101: * </p>
102: */
103: public String getSchedulerName() {
104: return sched.getSchedulerName();
105: }
106:
107: /**
108: * <p>
109: * Returns the instance Id of the <code>Scheduler</code>.
110: * </p>
111: */
112: public String getSchedulerInstanceId() {
113: return sched.getSchedulerInstanceId();
114: }
115:
116: public SchedulerMetaData getMetaData() {
117: return new SchedulerMetaData(getSchedulerName(),
118: getSchedulerInstanceId(), getClass(), false,
119: isStarted(), isInStandbyMode(), isShutdown(), sched
120: .runningSince(), sched.numJobsExecuted(), sched
121: .getJobStoreClass(), sched
122: .supportsPersistence(), sched
123: .getThreadPoolClass(), sched
124: .getThreadPoolSize(), sched.getVersion());
125:
126: }
127:
128: /**
129: * <p>
130: * Returns the <code>SchedulerContext</code> of the <code>Scheduler</code>.
131: * </p>
132: */
133: public SchedulerContext getContext() throws SchedulerException {
134: return sched.getSchedulerContext();
135: }
136:
137: ///////////////////////////////////////////////////////////////////////////
138: ///
139: /// Schedululer State Management Methods
140: ///
141: ///////////////////////////////////////////////////////////////////////////
142:
143: /**
144: * <p>
145: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
146: * </p>
147: */
148: public void start() throws SchedulerException {
149: sched.start();
150: }
151:
152: /**
153: * <p>
154: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
155: * </p>
156: *
157: * @deprecated
158: * @see #standby()
159: */
160: public void pause() {
161: this .standby();
162: }
163:
164: /**
165: * <p>
166: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
167: * </p>
168: */
169: public void standby() {
170: sched.standby();
171: }
172:
173: /**
174: * Whether the scheduler has been started.
175: *
176: * <p>
177: * Note: This only reflects whether <code>{@link #start()}</code> has ever
178: * been called on this Scheduler, so it will return <code>true</code> even
179: * if the <code>Scheduler</code> is currently in standby mode or has been
180: * since shutdown.
181: * </p>
182: *
183: * @see #start()
184: * @see #isShutdown()
185: * @see #isInStandbyMode()
186: */
187: public boolean isStarted() {
188: return (sched.runningSince() != null);
189: }
190:
191: /**
192: * <p>
193: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
194: * </p>
195: */
196: public boolean isInStandbyMode() {
197: return sched.isInStandbyMode();
198: }
199:
200: /**
201: * @deprecated
202: */
203: public boolean isPaused() {
204: return isInStandbyMode();
205: }
206:
207: /**
208: * <p>
209: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
210: * </p>
211: */
212: public void shutdown() {
213: sched.shutdown();
214: }
215:
216: /**
217: * <p>
218: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
219: * </p>
220: */
221: public void shutdown(boolean waitForJobsToComplete) {
222: sched.shutdown(waitForJobsToComplete);
223: }
224:
225: /**
226: * <p>
227: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
228: * </p>
229: */
230: public boolean isShutdown() {
231: return sched.isShutdown();
232: }
233:
234: /**
235: * <p>
236: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
237: * </p>
238: */
239: public List getCurrentlyExecutingJobs() {
240: return sched.getCurrentlyExecutingJobs();
241: }
242:
243: ///////////////////////////////////////////////////////////////////////////
244: ///
245: /// Scheduling-related Methods
246: ///
247: ///////////////////////////////////////////////////////////////////////////
248:
249: /**
250: * <p>
251: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
252: * passing the <code>SchedulingContext</code> associated with this
253: * instance.
254: * </p>
255: */
256: public Date scheduleJob(JobDetail jobDetail, Trigger trigger)
257: throws SchedulerException {
258: return sched.scheduleJob(schedCtxt, jobDetail, trigger);
259: }
260:
261: /**
262: * <p>
263: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
264: * passing the <code>SchedulingContext</code> associated with this
265: * instance.
266: * </p>
267: */
268: public Date scheduleJob(Trigger trigger) throws SchedulerException {
269: return sched.scheduleJob(schedCtxt, trigger);
270: }
271:
272: /**
273: * <p>
274: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
275: * passing the <code>SchedulingContext</code> associated with this
276: * instance.
277: * </p>
278: */
279: public void addJob(JobDetail jobDetail, boolean replace)
280: throws SchedulerException {
281: sched.addJob(schedCtxt, jobDetail, replace);
282: }
283:
284: /**
285: * <p>
286: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
287: * passing the <code>SchedulingContext</code> associated with this
288: * instance.
289: * </p>
290: */
291: public boolean deleteJob(String jobName, String groupName)
292: throws SchedulerException {
293: return sched.deleteJob(schedCtxt, jobName, groupName);
294: }
295:
296: /**
297: * <p>
298: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
299: * passing the <code>SchedulingContext</code> associated with this
300: * instance.
301: * </p>
302: */
303: public boolean unscheduleJob(String triggerName, String groupName)
304: throws SchedulerException {
305: return sched.unscheduleJob(schedCtxt, triggerName, groupName);
306: }
307:
308: /**
309: * <p>
310: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
311: * passing the <code>SchedulingContext</code> associated with this
312: * instance.
313: * </p>
314: */
315: public Date rescheduleJob(String triggerName, String groupName,
316: Trigger newTrigger) throws SchedulerException {
317: return sched.rescheduleJob(schedCtxt, triggerName, groupName,
318: newTrigger);
319: }
320:
321: /**
322: * <p>
323: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
324: * passing the <code>SchedulingContext</code> associated with this
325: * instance.
326: * </p>
327: */
328: public void triggerJob(String jobName, String groupName)
329: throws SchedulerException {
330: triggerJob(jobName, groupName, null);
331: }
332:
333: /**
334: * <p>
335: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
336: * passing the <code>SchedulingContext</code> associated with this
337: * instance.
338: * </p>
339: */
340: public void triggerJob(String jobName, String groupName,
341: JobDataMap data) throws SchedulerException {
342: sched.triggerJob(schedCtxt, jobName, groupName, data);
343: }
344:
345: /**
346: * <p>
347: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
348: * passing the <code>SchedulingContext</code> associated with this
349: * instance.
350: * </p>
351: */
352: public void triggerJobWithVolatileTrigger(String jobName,
353: String groupName) throws SchedulerException {
354: triggerJobWithVolatileTrigger(jobName, groupName, null);
355: }
356:
357: /**
358: * <p>
359: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
360: * passing the <code>SchedulingContext</code> associated with this
361: * instance.
362: * </p>
363: */
364: public void triggerJobWithVolatileTrigger(String jobName,
365: String groupName, JobDataMap data)
366: throws SchedulerException {
367: sched.triggerJobWithVolatileTrigger(schedCtxt, jobName,
368: groupName, data);
369: }
370:
371: /**
372: * <p>
373: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
374: * passing the <code>SchedulingContext</code> associated with this
375: * instance.
376: * </p>
377: */
378: public void pauseTrigger(String triggerName, String groupName)
379: throws SchedulerException {
380: sched.pauseTrigger(schedCtxt, triggerName, groupName);
381: }
382:
383: /**
384: * <p>
385: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
386: * passing the <code>SchedulingContext</code> associated with this
387: * instance.
388: * </p>
389: */
390: public void pauseTriggerGroup(String groupName)
391: throws SchedulerException {
392: sched.pauseTriggerGroup(schedCtxt, groupName);
393: }
394:
395: /**
396: * <p>
397: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
398: * passing the <code>SchedulingContext</code> associated with this
399: * instance.
400: * </p>
401: */
402: public void pauseJob(String jobName, String groupName)
403: throws SchedulerException {
404: sched.pauseJob(schedCtxt, jobName, groupName);
405: }
406:
407: /**
408: * @see org.quartz.Scheduler#getPausedTriggerGroups()
409: */
410: public Set getPausedTriggerGroups() throws SchedulerException {
411: return sched.getPausedTriggerGroups(schedCtxt);
412: }
413:
414: /**
415: * <p>
416: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
417: * passing the <code>SchedulingContext</code> associated with this
418: * instance.
419: * </p>
420: */
421: public void pauseJobGroup(String groupName)
422: throws SchedulerException {
423: sched.pauseJobGroup(schedCtxt, groupName);
424: }
425:
426: /**
427: * <p>
428: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
429: * passing the <code>SchedulingContext</code> associated with this
430: * instance.
431: * </p>
432: */
433: public void resumeTrigger(String triggerName, String groupName)
434: throws SchedulerException {
435: sched.resumeTrigger(schedCtxt, triggerName, groupName);
436: }
437:
438: /**
439: * <p>
440: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
441: * passing the <code>SchedulingContext</code> associated with this
442: * instance.
443: * </p>
444: */
445: public void resumeTriggerGroup(String groupName)
446: throws SchedulerException {
447: sched.resumeTriggerGroup(schedCtxt, groupName);
448: }
449:
450: /**
451: * <p>
452: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
453: * passing the <code>SchedulingContext</code> associated with this
454: * instance.
455: * </p>
456: */
457: public void resumeJob(String jobName, String groupName)
458: throws SchedulerException {
459: sched.resumeJob(schedCtxt, jobName, groupName);
460: }
461:
462: /**
463: * <p>
464: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
465: * passing the <code>SchedulingContext</code> associated with this
466: * instance.
467: * </p>
468: */
469: public void resumeJobGroup(String groupName)
470: throws SchedulerException {
471: sched.resumeJobGroup(schedCtxt, groupName);
472: }
473:
474: /**
475: * <p>
476: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
477: * passing the <code>SchedulingContext</code> associated with this
478: * instance.
479: * </p>
480: */
481: public void pauseAll() throws SchedulerException {
482: sched.pauseAll(schedCtxt);
483: }
484:
485: /**
486: * <p>
487: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
488: * passing the <code>SchedulingContext</code> associated with this
489: * instance.
490: * </p>
491: */
492: public void resumeAll() throws SchedulerException {
493: sched.resumeAll(schedCtxt);
494: }
495:
496: /**
497: * <p>
498: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
499: * passing the <code>SchedulingContext</code> associated with this
500: * instance.
501: * </p>
502: */
503: public String[] getJobGroupNames() throws SchedulerException {
504: return sched.getJobGroupNames(schedCtxt);
505: }
506:
507: /**
508: * <p>
509: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
510: * passing the <code>SchedulingContext</code> associated with this
511: * instance.
512: * </p>
513: */
514: public Trigger[] getTriggersOfJob(String jobName, String groupName)
515: throws SchedulerException {
516: return sched.getTriggersOfJob(schedCtxt, jobName, groupName);
517: }
518:
519: /**
520: * <p>
521: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
522: * passing the <code>SchedulingContext</code> associated with this
523: * instance.
524: * </p>
525: */
526: public String[] getJobNames(String groupName)
527: throws SchedulerException {
528: return sched.getJobNames(schedCtxt, groupName);
529: }
530:
531: /**
532: * <p>
533: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
534: * passing the <code>SchedulingContext</code> associated with this
535: * instance.
536: * </p>
537: */
538: public String[] getTriggerGroupNames() throws SchedulerException {
539: return sched.getTriggerGroupNames(schedCtxt);
540: }
541:
542: /**
543: * <p>
544: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
545: * passing the <code>SchedulingContext</code> associated with this
546: * instance.
547: * </p>
548: */
549: public String[] getTriggerNames(String groupName)
550: throws SchedulerException {
551: return sched.getTriggerNames(schedCtxt, groupName);
552: }
553:
554: /**
555: * <p>
556: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
557: * passing the <code>SchedulingContext</code> associated with this
558: * instance.
559: * </p>
560: */
561: public JobDetail getJobDetail(String jobName, String jobGroup)
562: throws SchedulerException {
563: return sched.getJobDetail(schedCtxt, jobName, jobGroup);
564: }
565:
566: /**
567: * <p>
568: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
569: * passing the <code>SchedulingContext</code> associated with this
570: * instance.
571: * </p>
572: */
573: public Trigger getTrigger(String triggerName, String triggerGroup)
574: throws SchedulerException {
575: return sched.getTrigger(schedCtxt, triggerName, triggerGroup);
576: }
577:
578: /**
579: * <p>
580: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
581: * passing the <code>SchedulingContext</code> associated with this
582: * instance.
583: * </p>
584: */
585: public int getTriggerState(String triggerName, String triggerGroup)
586: throws SchedulerException {
587: return sched.getTriggerState(schedCtxt, triggerName,
588: triggerGroup);
589: }
590:
591: /**
592: * <p>
593: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
594: * passing the <code>SchedulingContext</code> associated with this
595: * instance.
596: * </p>
597: */
598: public void addCalendar(String calName, Calendar calendar,
599: boolean replace, boolean updateTriggers)
600: throws SchedulerException {
601: sched.addCalendar(schedCtxt, calName, calendar, replace,
602: updateTriggers);
603: }
604:
605: /**
606: * <p>
607: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
608: * passing the <code>SchedulingContext</code> associated with this
609: * instance.
610: * </p>
611: */
612: public boolean deleteCalendar(String calName)
613: throws SchedulerException {
614: return sched.deleteCalendar(schedCtxt, calName);
615: }
616:
617: /**
618: * <p>
619: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
620: * passing the <code>SchedulingContext</code> associated with this
621: * instance.
622: * </p>
623: */
624: public Calendar getCalendar(String calName)
625: throws SchedulerException {
626: return sched.getCalendar(schedCtxt, calName);
627: }
628:
629: /**
630: * <p>
631: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>,
632: * passing the <code>SchedulingContext</code> associated with this
633: * instance.
634: * </p>
635: */
636: public String[] getCalendarNames() throws SchedulerException {
637: return sched.getCalendarNames(schedCtxt);
638: }
639:
640: ///////////////////////////////////////////////////////////////////////////
641: ///
642: /// Listener-related Methods
643: ///
644: ///////////////////////////////////////////////////////////////////////////
645:
646: /**
647: * <p>
648: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
649: * </p>
650: */
651: public void addGlobalJobListener(JobListener jobListener) {
652: sched.addGlobalJobListener(jobListener);
653: }
654:
655: /**
656: * <p>
657: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
658: * </p>
659: */
660: public void addJobListener(JobListener jobListener) {
661: sched.addJobListener(jobListener);
662: }
663:
664: /**
665: * <p>
666: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
667: * </p>
668: * @deprecated Use <code>{@link #removeGlobalJobListener(String)}</code>
669: */
670: public boolean removeGlobalJobListener(JobListener jobListener) {
671: return sched
672: .removeGlobalJobListener((jobListener == null) ? null
673: : jobListener.getName());
674: }
675:
676: /**
677: * <p>
678: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
679: * </p>
680: */
681: public boolean removeGlobalJobListener(String name) {
682: return sched.removeGlobalJobListener(name);
683: }
684:
685: /**
686: * <p>
687: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
688: * </p>
689: */
690: public boolean removeJobListener(String name) {
691: return sched.removeJobListener(name);
692: }
693:
694: /**
695: * <p>
696: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
697: * </p>
698: */
699: public List getGlobalJobListeners() {
700: return sched.getGlobalJobListeners();
701: }
702:
703: /**
704: * <p>
705: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
706: * </p>
707: */
708: public Set getJobListenerNames() {
709: return sched.getJobListenerNames();
710: }
711:
712: /**
713: * <p>
714: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
715: * </p>
716: */
717: public JobListener getGlobalJobListener(String name) {
718: return sched.getGlobalJobListener(name);
719: }
720:
721: /**
722: * <p>
723: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
724: * </p>
725: */
726: public JobListener getJobListener(String name) {
727: return sched.getJobListener(name);
728: }
729:
730: /**
731: * <p>
732: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
733: * </p>
734: */
735: public void addGlobalTriggerListener(TriggerListener triggerListener) {
736: sched.addGlobalTriggerListener(triggerListener);
737: }
738:
739: /**
740: * <p>
741: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
742: * </p>
743: */
744: public void addTriggerListener(TriggerListener triggerListener) {
745: sched.addTriggerListener(triggerListener);
746: }
747:
748: /**
749: * <p>
750: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
751: * </p>
752: *
753: * @deprecated Use <code>{@link #removeGlobalTriggerListener(String)}</code>
754: */
755: public boolean removeGlobalTriggerListener(
756: TriggerListener triggerListener) {
757: return sched
758: .removeGlobalTriggerListener((triggerListener == null) ? null
759: : triggerListener.getName());
760: }
761:
762: /**
763: * <p>
764: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
765: * </p>
766: */
767: public boolean removeGlobalTriggerListener(String name) {
768: return sched.removeGlobalTriggerListener(name);
769: }
770:
771: /**
772: * <p>
773: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
774: * </p>
775: */
776: public boolean removeTriggerListener(String name) {
777: return sched.removeTriggerListener(name);
778: }
779:
780: /**
781: * <p>
782: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
783: * </p>
784: */
785: public List getGlobalTriggerListeners() {
786: return sched.getGlobalTriggerListeners();
787: }
788:
789: /**
790: * <p>
791: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
792: * </p>
793: */
794: public Set getTriggerListenerNames() {
795: return sched.getTriggerListenerNames();
796: }
797:
798: /**
799: * <p>
800: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
801: * </p>
802: */
803: public TriggerListener getGlobalTriggerListener(String name) {
804: return sched.getGlobalTriggerListener(name);
805: }
806:
807: /**
808: * <p>
809: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
810: * </p>
811: */
812: public TriggerListener getTriggerListener(String name) {
813: return sched.getTriggerListener(name);
814: }
815:
816: /**
817: * <p>
818: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
819: * </p>
820: */
821: public void addSchedulerListener(SchedulerListener schedulerListener) {
822: sched.addSchedulerListener(schedulerListener);
823: }
824:
825: /**
826: * <p>
827: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
828: * </p>
829: */
830: public boolean removeSchedulerListener(
831: SchedulerListener schedulerListener) {
832: return sched.removeSchedulerListener(schedulerListener);
833: }
834:
835: /**
836: * <p>
837: * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
838: * </p>
839: */
840: public List getSchedulerListeners() {
841: return sched.getSchedulerListeners();
842: }
843:
844: public boolean interrupt(String jobName, String groupName)
845: throws UnableToInterruptJobException {
846: return sched.interrupt(schedCtxt, jobName, groupName);
847: }
848:
849: /**
850: * @see org.quartz.Scheduler#setJobFactory(org.quartz.spi.JobFactory)
851: */
852: public void setJobFactory(JobFactory factory)
853: throws SchedulerException {
854: sched.setJobFactory(factory);
855: }
856:
857: }
|