KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > quartz > MockScheduler


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.quartz;
5
6 import java.util.Date JavaDoc;
7 import java.util.List JavaDoc;
8 import java.util.Set JavaDoc;
9
10 import org.quartz.Calendar;
11 import org.quartz.JobDetail;
12 import org.quartz.JobListener;
13 import org.quartz.Scheduler;
14 import org.quartz.SchedulerContext;
15 import org.quartz.SchedulerException;
16 import org.quartz.SchedulerListener;
17 import org.quartz.SchedulerMetaData;
18 import org.quartz.Trigger;
19 import org.quartz.TriggerListener;
20 import org.quartz.UnableToInterruptJobException;
21
22 /**
23  *
24  */

25 public class MockScheduler implements Scheduler {
26
27     public Trigger trigger;
28     public JobDetail jobDetail;
29     
30         /**
31          * <p>
32          * Returns the name of the <code>Scheduler</code>.
33          * </p>
34          */

35         public String JavaDoc getSchedulerName() throws SchedulerException {
36             return "Mock Scheduler";
37         }
38
39         /**
40          * <p>
41          * Returns the instance Id of the <code>Scheduler</code>.
42          * </p>
43          */

44         public String JavaDoc getSchedulerInstanceId() throws SchedulerException {
45             return "0001";
46         }
47
48         /**
49          * <p>
50          * Returns the <code>SchedulerContext</code> of the <code>Scheduler</code>.
51          * </p>
52          */

53         public SchedulerContext getContext() throws SchedulerException {
54             return null;
55         }
56
57         ///////////////////////////////////////////////////////////////////////////
58
///
59
/// Schedululer State Management Methods
60
///
61
///////////////////////////////////////////////////////////////////////////
62

63         /**
64          * <p>
65          * Starts the <code>Scheduler</code>'s threads that fire <code>{@link Trigger}s</code>.
66          * </p>
67          *
68          * <p>
69          * All <code>{@link Trigger}s</code> that have misfired will be passed
70          * to the appropriate TriggerListener(s).
71          * </p>
72          *
73          * @throws SchedulerException
74          * if <code>close()</code> has been called, or there is an
75          * error within the <code>Scheduler</code>.
76          *
77          * @see #pause
78          * @see #shutdown
79          */

80         public void start() throws SchedulerException { }
81
82         /**
83          * <p>
84          * Temporarily halts the <code>Scheduler</code>'s firing of <code>{@link Trigger}s</code>.
85          * </p>
86          *
87          * <p>
88          * When <code>start()</code> is called (to un-pause), trigger misfire
89          * instructions will NOT be applied.
90          * </p>
91          *
92          * <p>
93          * The scheduler is not destroyed, and can be re-started at any time.
94          * </p>
95          *
96          * @see #start()
97          * @see #pauseAll()
98          */

99         public void pause() throws SchedulerException {
100             throw new UnsupportedOperationException JavaDoc();
101         }
102
103         /**
104          * <p>
105          * Reports whether the <code>Scheduler</code> is paused.
106          * </p>
107          */

108         public boolean isPaused() throws SchedulerException {
109             return false;
110         }
111
112         /**
113          * <p>
114          * Halts the <code>Scheduler</code>'s firing of <code>{@link Trigger}s</code>,
115          * and cleans up all resources associated with the Scheduler. Equivalent to
116          * <code>shutdown(false)</code>.
117          * </p>
118          *
119          * <p>
120          * The scheduler cannot be re-started.
121          * </p>
122          *
123          * @see #shutdown(boolean)
124          */

125         public void shutdown() throws SchedulerException { }
126
127         /**
128          * <p>
129          * Halts the <code>Scheduler</code>'s firing of <code>{@link Trigger}s</code>,
130          * and cleans up all resources associated with the Scheduler.
131          * </p>
132          *
133          * <p>
134          * The scheduler cannot be re-started.
135          * </p>
136          *
137          * @param waitForJobsToComplete
138          * if <code>true</code> the scheduler will not allow this method
139          * to return until all currently executing jobs have completed.
140          *
141          * @see #shutdown
142          */

143         public void shutdown(boolean waitForJobsToComplete)
144                 throws SchedulerException {
145             
146         }
147
148         /**
149          * <p>
150          * Reports whether the <code>Scheduler</code> has been shutdown.
151          * </p>
152          */

153         public boolean isShutdown() throws SchedulerException {
154             return false;
155         }
156
157         /**
158          * <p>
159          * Get a <code>SchedulerMetaData</code> object describiing the settings
160          * and capabilities of the scheduler instance.
161          * </p>
162          *
163          * <p>
164          * Note that the data returned is an 'instantaneous' snap-shot, and that as
165          * soon as it's returned, the meta data values may be different.
166          * </p>
167          */

168         public SchedulerMetaData getMetaData() throws SchedulerException {
169             return null;
170         }
171
172         /**
173          * <p>
174          * Return a list of <code>JobExecutionContext</code> objects that
175          * represent all currently executing Jobs.
176          * </p>
177          *
178          * <p>
179          * Note that the list returned is an 'instantaneous' snap-shot, and that as
180          * soon as it's returned, the true list of executing jobs may be different.
181          * Also please read the doc associated with <code>JobExecutionContext</code>-
182          * especially if you're using RMI.
183          * </p>
184          *
185          * @see JobExecutionContext
186          */

187         public List JavaDoc getCurrentlyExecutingJobs() throws SchedulerException {
188             return null;
189         }
190
191         ///////////////////////////////////////////////////////////////////////////
192
///
193
/// Scheduling-related Methods
194
///
195
///////////////////////////////////////////////////////////////////////////
196

197         /**
198          * <p>
199          * Add the given <code>{@link org.quartz.JobDetail}</code> to the
200          * Scheduler, and associate the given <code>{@link Trigger}</code> with
201          * it.
202          * </p>
203          *
204          * <p>
205          * If the given Trigger does not reference any <code>Job</code>, then it
206          * will be set to reference the Job passed with it into this method.
207          * </p>
208          *
209          * @throws SchedulerException
210          * if the Job or Trigger cannot be added to the Scheduler, or
211          * there is an internal Scheduler error.
212          */

213         public Date JavaDoc scheduleJob(JobDetail jobDetail, Trigger trigger)
214                 throws SchedulerException {
215             this.trigger = trigger;
216             this.jobDetail = jobDetail;
217             return trigger.getStartTime();
218         }
219
220         /**
221          * <p>
222          * Schedule the given <code>{@link org.quartz.Trigger}</code> with the
223          * <code>Job</code> identified by the <code>Trigger</code>'s settings.
224          * </p>
225          *
226          * @throws SchedulerException
227          * if the indicated Job does not exist, or the Trigger cannot be
228          * added to the Scheduler, or there is an internal Scheduler
229          * error.
230          */

231         public Date JavaDoc scheduleJob(Trigger trigger) throws SchedulerException {
232             this.trigger = trigger;
233             return trigger.getStartTime();
234         }
235
236         /**
237          * <p>
238          * Remove the indicated <code>{@link Trigger}</code> from the scheduler.
239          * </p>
240          */

241         public boolean unscheduleJob(String JavaDoc triggerName, String JavaDoc groupName)
242                 throws SchedulerException {
243             this.trigger = null;
244             return true;
245         }
246
247         /**
248          * <p>
249          * Remove (delete) the <code>{@link org.quartz.Trigger}</code> with the
250          * given name, and store the new given one - which must be associated
251          * with the same job - however, the new trigger need not have the same
252          * name as the old trigger.
253          * </p>
254          *
255          * @param triggerName
256          * The name of the <code>Trigger</code> to be replaced.
257          * @param groupName
258          * The group name of the <code>Trigger</code> to be replaced.
259          * @param newTrigger
260          * The new <code>Trigger</code> to be stored.
261          * @return <code>null</code> if a <code>Trigger</code> with the given
262          * name & group was not found and removed from the store, otherwise
263          * the first fire time of the newly scheduled trigger.
264          */

265         public Date JavaDoc rescheduleJob(String JavaDoc triggerName,
266                 String JavaDoc groupName, Trigger newTrigger) throws SchedulerException {
267             this.trigger = newTrigger;
268             return trigger.getStartTime();
269         }
270
271         
272         /**
273          * <p>
274          * Add the given <code>Job</code> to the Scheduler - with no associated
275          * <code>Trigger</code>. The <code>Job</code> will be 'dormant' until
276          * it is scheduled with a <code>Trigger</code>, or <code>Scheduler.triggerJob()</code>
277          * is called for it.
278          * </p>
279          *
280          * <p>
281          * The <code>Job</code> must by definition be 'durable', if it is not,
282          * SchedulerException will be thrown.
283          * </p>
284          *
285          * @throws SchedulerException
286          * if there is an internal Scheduler error, or if the Job is not
287          * durable, or a Job with the same name already exists, and
288          * <code>replace</code> is <code>false</code>.
289          */

290         public void addJob(JobDetail jobDetail, boolean replace)
291                 throws SchedulerException {
292             throw new UnsupportedOperationException JavaDoc();
293         }
294
295         /**
296          * <p>
297          * Delete the identified <code>Job</code> from the Scheduler - and any
298          * associated <code>Trigger</code>s.
299          * </p>
300          *
301          * @return true if the Job was found and deleted.
302          * @throws SchedulerException
303          * if there is an internal Scheduler error.
304          */

305         public boolean deleteJob(String JavaDoc jobName, String JavaDoc groupName)
306                 throws SchedulerException {
307             throw new UnsupportedOperationException JavaDoc();
308         }
309
310         /**
311          * <p>
312          * Trigger the identified <code>{@link org.quartz.JobDetail}</code>
313          * (execute it now) - the generated trigger will be non-volatile.
314          * </p>
315          */

316         public void triggerJob(String JavaDoc jobName, String JavaDoc groupName)
317                 throws SchedulerException {
318             throw new UnsupportedOperationException JavaDoc();
319         }
320
321         /**
322          * <p>
323          * Trigger the identified <code>{@link org.quartz.JobDetail}</code>
324          * (execute it now) - the generated trigger will be volatile.
325          * </p>
326          */

327         public void triggerJobWithVolatileTrigger(String JavaDoc jobName, String JavaDoc groupName)
328                 throws SchedulerException {
329             throw new UnsupportedOperationException JavaDoc();
330         }
331
332         /**
333          * <p>
334          * Pause the <code>{@link org.quartz.JobDetail}</code> with the given
335          * name - by pausing all of its current <code>Trigger</code>s.
336          * </p>
337          *
338          * @see #resumeJob(String, String)
339          */

340         public void pauseJob(String JavaDoc jobName, String JavaDoc groupName)
341                 throws SchedulerException {
342             throw new UnsupportedOperationException JavaDoc();
343         }
344
345         /**
346          * <p>
347          * Pause all of the <code>{@link org.quartz.JobDetail}s</code> in the
348          * given group - by pausing all of their <code>Trigger</code>s.
349          * </p>
350          *
351          * <p>
352          * The Scheduler will "remember" that the group is paused, and impose the
353          * pause on any new jobs that are added to the group while the group is
354          * paused.
355          * </p>
356          *
357          * @see #resumeJobGroup(String)
358          */

359         public void pauseJobGroup(String JavaDoc groupName) throws SchedulerException {
360             throw new UnsupportedOperationException JavaDoc();
361         }
362
363         /**
364          * <p>
365          * Pause the <code>{@link Trigger}</code> with the given name.
366          * </p>
367          *
368          * @see #resumeTrigger(String, String)
369          */

370         public void pauseTrigger(String JavaDoc triggerName, String JavaDoc groupName)
371                 throws SchedulerException {
372             throw new UnsupportedOperationException JavaDoc();
373         }
374
375         /**
376          * <p>
377          * Pause all of the <code>{@link Trigger}s</code> in the given group.
378          * </p>
379          *
380          * <p>
381          * The Scheduler will "remember" that the group is paused, and impose the
382          * pause on any new triggers that are added to the group while the group is
383          * paused.
384          * </p>
385          *
386          * @see #resumeTriggerGroup(String)
387          */

388         public void pauseTriggerGroup(String JavaDoc groupName) throws SchedulerException {
389             throw new UnsupportedOperationException JavaDoc();
390         }
391
392         /**
393          * <p>
394          * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with
395          * the given name.
396          * </p>
397          *
398          * <p>
399          * If any of the <code>Job</code>'s<code>Trigger</code> s missed one
400          * or more fire-times, then the <code>Trigger</code>'s misfire
401          * instruction will be applied.
402          * </p>
403          *
404          * @see #pauseJob(String, String)
405          */

406         public void resumeJob(String JavaDoc jobName, String JavaDoc groupName)
407                 throws SchedulerException {
408             throw new UnsupportedOperationException JavaDoc();
409         }
410
411         /**
412          * <p>
413          * Resume (un-pause) all of the <code>{@link org.quartz.JobDetail}s</code>
414          * in the given group.
415          * </p>
416          *
417          * <p>
418          * If any of the <code>Job</code> s had <code>Trigger</code> s that
419          * missed one or more fire-times, then the <code>Trigger</code>'s
420          * misfire instruction will be applied.
421          * </p>
422          *
423          * @see #pauseJobGroup(String)
424          */

425         public void resumeJobGroup(String JavaDoc groupName) throws SchedulerException {
426             throw new UnsupportedOperationException JavaDoc();
427         }
428
429         /**
430          * <p>
431          * Resume (un-pause) the <code>{@link Trigger}</code> with the given
432          * name.
433          * </p>
434          *
435          * <p>
436          * If the <code>Trigger</code> missed one or more fire-times, then the
437          * <code>Trigger</code>'s misfire instruction will be applied.
438          * </p>
439          *
440          * @see #pauseTrigger(String, String)
441          */

442         public void resumeTrigger(String JavaDoc triggerName, String JavaDoc groupName)
443                 throws SchedulerException {
444             throw new UnsupportedOperationException JavaDoc();
445         }
446
447         /**
448          * <p>
449          * Resume (un-pause) all of the <code>{@link Trigger}s</code> in the
450          * given group.
451          * </p>
452          *
453          * <p>
454          * If any <code>Trigger</code> missed one or more fire-times, then the
455          * <code>Trigger</code>'s misfire instruction will be applied.
456          * </p>
457          *
458          * @see #pauseTriggerGroup(String)
459          */

460         public void resumeTriggerGroup(String JavaDoc groupName) throws SchedulerException {
461             throw new UnsupportedOperationException JavaDoc();
462         }
463
464         /**
465          * <p>
466          * Pause all triggers - equivalent of calling <code>pauseTriggerGroup(group)</code>
467          * on every group.
468          * </p>
469          *
470          * <p>
471          * When <code>resumeAll()</code> is called (to un-pause), trigger misfire
472          * instructions WILL be applied.
473          * </p>
474          *
475          * @see #resumeAll()
476          * @see #pauseTriggerGroup(String)
477          * @see #pause()
478          */

479         public void pauseAll() throws SchedulerException {
480             throw new UnsupportedOperationException JavaDoc();
481         }
482
483         /**
484          * <p>
485          * Resume (un-pause) all triggers - equivalent of calling <code>resumeTriggerGroup(group)</code>
486          * on every group.
487          * </p>
488          *
489          * <p>
490          * If any <code>Trigger</code> missed one or more fire-times, then the
491          * <code>Trigger</code>'s misfire instruction will be applied.
492          * </p>
493          *
494          * @see #pauseAll()
495          */

496         public void resumeAll() throws SchedulerException {
497             throw new UnsupportedOperationException JavaDoc();
498         }
499
500         /**
501          * <p>
502          * Get the names of all known <code>{@link org.quartz.JobDetail}</code>
503          * groups.
504          * </p>
505          */

506         public String JavaDoc[] getJobGroupNames() throws SchedulerException {
507             return new String JavaDoc[] {Scheduler.DEFAULT_GROUP};
508         }
509
510         /**
511          * <p>
512          * Get the names of all the <code>{@link org.quartz.JobDetail}s</code>
513          * in the given group.
514          * </p>
515          */

516         public String JavaDoc[] getJobNames(String JavaDoc groupName) throws SchedulerException {
517             return new String JavaDoc[] { jobDetail.getName() };
518         }
519
520         /**
521          * <p>
522          * Get all <code>{@link Trigger}</code> s that are associated with the
523          * identified <code>{@link org.quartz.JobDetail}</code>.
524          * </p>
525          */

526         public Trigger[] getTriggersOfJob(String JavaDoc jobName, String JavaDoc groupName)
527                 throws SchedulerException {
528             return new Trigger[] { trigger };
529         }
530
531         /**
532          * <p>
533          * Get the names of all known <code>{@link Trigger}</code> groups.
534          * </p>
535          */

536         public String JavaDoc[] getTriggerGroupNames() throws SchedulerException {
537             return new String JavaDoc[] { "What's the default trigger group?" };
538         }
539
540         /**
541          * <p>
542          * Get the names of all the <code>{@link Trigger}s</code> in the given
543          * group.
544          * </p>
545          */

546         public String JavaDoc[] getTriggerNames(String JavaDoc groupName) throws SchedulerException {
547             return new String JavaDoc[] { trigger.getFullName() };
548         }
549
550         /**
551          * <p>
552          * Get the names of all <code>{@link Trigger}</code> groups that are paused.
553          * </p>
554          *
555          * @return
556          * @throws SchedulerException
557          */

558         public Set JavaDoc getPausedTriggerGroups() throws SchedulerException {
559                 throw new UnsupportedOperationException JavaDoc();
560             }
561         
562         /**
563          * <p>
564          * Get the <code>{@link JobDetail}</code> for the <code>Job</code>
565          * instance with the given name and group.
566          * </p>
567          */

568         public JobDetail getJobDetail(String JavaDoc jobName, String JavaDoc jobGroup)
569                 throws SchedulerException {
570             return jobDetail;
571         }
572
573         /**
574          * <p>
575          * Get the <code>{@link Trigger}</code> instance with the given name and
576          * group.
577          * </p>
578          */

579         public Trigger getTrigger(String JavaDoc triggerName, String JavaDoc triggerGroup)
580                 throws SchedulerException {
581             return trigger;
582         }
583
584         /**
585          * <p>
586          * Get the current state of the identified <code>{@link Trigger}</code>.
587          * </p>
588          *
589          * @see Trigger#STATE_NORMAL
590          * @see Trigger#STATE_PAUSED
591          * @see Trigger#STATE_COMPLETE
592          * @see Trigger#STATE_ERROR
593          * @see Trigger#STATE_BLOCKED
594          * @see Trigger#STATE_NONE
595          */

596         public int getTriggerState(String JavaDoc triggerName, String JavaDoc triggerGroup)
597                 throws SchedulerException {
598             return Trigger.STATE_NONE;
599         }
600
601         /**
602          * <p>
603          * Add (register) the given <code>Calendar</code> to the Scheduler.
604          * </p>
605          *
606          * @param updateTriggers whether or not to update existing triggers that
607          * referenced the already existing calendar so that they are 'correct'
608          * based on the new trigger.
609          *
610          *
611          * @throws SchedulerException
612          * if there is an internal Scheduler error, or a Calendar with
613          * the same name already exists, and <code>replace</code> is
614          * <code>false</code>.
615          */

616         public void addCalendar(String JavaDoc calName, Calendar calendar, boolean replace, boolean updateTriggers)
617                 throws SchedulerException {
618             throw new UnsupportedOperationException JavaDoc();
619         }
620
621         /**
622          * <p>
623          * Delete the identified <code>Calendar</code> from the Scheduler.
624          * </p>
625          *
626          * @return true if the Calendar was found and deleted.
627          * @throws SchedulerException
628          * if there is an internal Scheduler error.
629          */

630         public boolean deleteCalendar(String JavaDoc calName) throws SchedulerException {
631             throw new UnsupportedOperationException JavaDoc();
632         }
633         
634         /**
635          * <p>
636          * Get the <code>{@link Calendar}</code> instance with the given name.
637          * </p>
638          */

639         public Calendar getCalendar(String JavaDoc calName) throws SchedulerException {
640             throw new UnsupportedOperationException JavaDoc();
641         }
642
643         /**
644          * <p>
645          * Get the names of all registered <code>{@link Calendar}s</code>.
646          * </p>
647          */

648         public String JavaDoc[] getCalendarNames() throws SchedulerException {
649             throw new UnsupportedOperationException JavaDoc();
650         }
651
652         ///////////////////////////////////////////////////////////////////////////
653
///
654
/// Listener-related Methods
655
///
656
///////////////////////////////////////////////////////////////////////////
657

658         /**
659          * <p>
660          * Add the given <code>{@link JobListener}</code> to the <code>Scheduler</code>'s
661          * <i>global</i> list.
662          * </p>
663          *
664          * <p>
665          * Listeners in the 'global' list receive notification of execution events
666          * for ALL <code>{@link org.quartz.JobDetail}</code>s.
667          * </p>
668          */

669         public void addGlobalJobListener(JobListener jobListener)
670                 throws SchedulerException {
671             throw new UnsupportedOperationException JavaDoc();
672         }
673
674         /**
675          * <p>
676          * Add the given <code>{@link JobListener}</code> to the <code>Scheduler</code>'s
677          * list, of registered <code>JobListener</code>s.
678          */

679         public void addJobListener(JobListener jobListener)
680                 throws SchedulerException {
681             throw new UnsupportedOperationException JavaDoc();
682         }
683
684         /**
685          * <p>
686          * Remove the given <code>{@link JobListener}</code> from the <code>Scheduler</code>'s
687          * list of <i>global</i> listeners.
688          * </p>
689          *
690          * @return true if the identifed listener was found in the list, and
691          * removed.
692          */

693         public boolean removeGlobalJobListener(JobListener jobListener)
694                 throws SchedulerException {
695             throw new UnsupportedOperationException JavaDoc();
696         }
697
698         /**
699          * <p>
700          * Remove the identifed <code>{@link JobListener}</code> from the <code>Scheduler</code>'s
701          * list of registered listeners.
702          * </p>
703          *
704          * @return true if the identifed listener was found in the list, and
705          * removed.
706          */

707         public boolean removeJobListener(String JavaDoc name) throws SchedulerException {
708             throw new UnsupportedOperationException JavaDoc();
709         }
710
711         /**
712          * <p>
713          * Get a List containing all of the <code>{@link JobListener}</code> s in
714          * the <code>Scheduler</code>'s<i>global</i> list.
715          * </p>
716          */

717         public List JavaDoc getGlobalJobListeners() throws SchedulerException {
718             throw new UnsupportedOperationException JavaDoc();
719         }
720
721         /**
722          * <p>
723          * Get a Set containing the names of all the <i>non-global</i><code>{@link JobListener}</code>
724          * s registered with the <code>Scheduler</code>.
725          * </p>
726          */

727         public Set JavaDoc getJobListenerNames() throws SchedulerException {
728             throw new UnsupportedOperationException JavaDoc();
729         }
730
731         /**
732          * <p>
733          * Get the <i>non-global</i><code>{@link JobListener}</code> that has
734          * the given name.
735          * </p>
736          */

737         public JobListener getJobListener(String JavaDoc name) throws SchedulerException {
738             throw new UnsupportedOperationException JavaDoc();
739         }
740
741         /**
742          * <p>
743          * Add the given <code>{@link TriggerListener}</code> to the <code>Scheduler</code>'s
744          * <i>global</i> list.
745          * </p>
746          *
747          * <p>
748          * Listeners in the 'global' list receive notification of execution events
749          * for ALL <code>{@link Trigger}</code>s.
750          * </p>
751          */

752         public void addGlobalTriggerListener(TriggerListener triggerListener)
753                 throws SchedulerException {
754             throw new UnsupportedOperationException JavaDoc();
755         }
756
757         /**
758          * <p>
759          * Add the given <code>{@link TriggerListener}</code> to the <code>Scheduler</code>'s
760          * list, of registered <code>TriggerListener</code>s.
761          */

762         public void addTriggerListener(TriggerListener triggerListener)
763                 throws SchedulerException {
764             throw new UnsupportedOperationException JavaDoc();
765         }
766
767         /**
768          * <p>
769          * Remove the given <code>{@link TriggerListener}</code> from the <code>Scheduler</code>'s
770          * list of <i>global</i> listeners.
771          * </p>
772          *
773          * @return true if the identifed listener was found in the list, and
774          * removed.
775          */

776         public boolean removeGlobalTriggerListener(TriggerListener triggerListener)
777                 throws SchedulerException {
778             throw new UnsupportedOperationException JavaDoc();
779         }
780         /**
781          * <p>
782          * Remove the identifed <code>{@link TriggerListener}</code> from the
783          * <code>Scheduler</code>'s list of registered listeners.
784          * </p>
785          *
786          * @return true if the identifed listener was found in the list, and
787          * removed.
788          */

789         public boolean removeTriggerListener(String JavaDoc name) throws SchedulerException {
790             throw new UnsupportedOperationException JavaDoc();
791         }
792
793         /**
794          * <p>
795          * Get a List containing all of the <code>{@link TriggerListener}</code>
796          * s in the <code>Scheduler</code>'s<i>global</i> list.
797          * </p>
798          */

799         public List JavaDoc getGlobalTriggerListeners() throws SchedulerException {
800             throw new UnsupportedOperationException JavaDoc();
801         }
802
803         /**
804          * <p>
805          * Get a Set containing the names of all the <i>non-global</i><code>{@link TriggerListener}</code>
806          * s registered with the <code>Scheduler</code>.
807          * </p>
808          */

809         public Set JavaDoc getTriggerListenerNames() throws SchedulerException {
810             throw new UnsupportedOperationException JavaDoc();
811         }
812
813         /**
814          * <p>
815          * Get the <i>non-global</i><code>{@link TriggerListener}</code> that
816          * has the given name.
817          * </p>
818          */

819         public TriggerListener getTriggerListener(String JavaDoc name)
820                 throws SchedulerException {
821             throw new UnsupportedOperationException JavaDoc();
822         }
823
824         /**
825          * <p>
826          * Register the given <code>{@link SchedulerListener}</code> with the
827          * <code>Scheduler</code>.
828          * </p>
829          */

830         public void addSchedulerListener(SchedulerListener schedulerListener)
831                 throws SchedulerException {
832             throw new UnsupportedOperationException JavaDoc();
833         }
834
835         /**
836          * <p>
837          * Remove the given <code>{@link SchedulerListener}</code> from the
838          * <code>Scheduler</code>.
839          * </p>
840          *
841          * @return true if the identifed listener was found in the list, and
842          * removed.
843          */

844         public boolean removeSchedulerListener(SchedulerListener schedulerListener)
845                 throws SchedulerException {
846             throw new UnsupportedOperationException JavaDoc();
847         }
848
849         /**
850          * <p>
851          * Get a List containing all of the <code>{@link SchedulerListener}</code>
852          * s registered with the <code>Scheduler</code>.
853          * </p>
854          */

855         public List JavaDoc getSchedulerListeners() throws SchedulerException {
856             throw new UnsupportedOperationException JavaDoc();
857         }
858
859
860         /**
861          * <p>
862          * Request the interruption of all currently executing instances of the
863          * identified <code>Job</code>, which must be an implementor of the
864          * <code>InterruptableJob</code> interface.
865          * </p>
866          *
867          * <p>
868          * If more than one instance of the identified job is currently executing,
869          * the <code>InterruptableJob#interrupt()</code> method will be called on
870          * each instance. However, there is a limitation that in the case that
871          * <code>interrupt()</code> on one instances throws an exception, all
872          * remaining instances (that have not yet been interrupted) will not have
873          * their <code>interrupt()</code> method called.
874          * </p>
875          *
876          * <p>
877          * If you wish to interrupt a specific instance of a job (when more than
878          * one is executing) you can do so by calling
879          * <code>{@link #getCurrentlyExecutingJobs()}</code> to obtain a handle
880          * to the job instance, and then invoke <code>interrupt()</code> on it
881          * yourself.
882          * </p>
883          *
884          * @param jobName
885          * @param groupName
886          * @return true is at least one instance of the identified job was found
887          * and interrupted.
888          * @throws UnableToInterruptJobException if the job does not implement
889          * <code>InterruptableJob</code>, or there is an exception while
890          * interrupting the job.
891          * @see InterruptableJob#interrupt()
892          * @see #getCurrentlyExecutingJobs()
893          */

894         public boolean interrupt(String JavaDoc jobName, String JavaDoc groupName) throws UnableToInterruptJobException {
895             throw new UnsupportedOperationException JavaDoc();
896         }
897 }
898
Popular Tags