|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.scheduler.quartz.QuartzScheduler
@Named(value="scheduler") public class QuartzScheduler
A scheduler implementation using Quartz as scheduling backend. It wraps a Quartz scheduler and delegates to it all of the call after transforming the parameters into their Quartz counterparts.
Nested Class Summary | |
---|---|
static class |
QuartzScheduler.QuartzJob
A job as registered within the Quartz scheduler. |
Constructor Summary | |
---|---|
protected |
QuartzScheduler()
Constructs a new scheduler and bootstraps the Quartz scheduler backend. |
Method Summary | |
---|---|
boolean |
isJobScheduled(String jobName)
Is the job identified by the specified name is scheduled by this scheduler? |
ScheduledJob |
scheduleJob(Job theJob,
JobTrigger trigger)
Schedules the specified job. |
ScheduledJob |
scheduleJob(Job theJob,
JobTrigger trigger,
SchedulerEventListener listener)
Schedules the specified job. |
ScheduledJob |
scheduleJob(String jobName,
JobTrigger trigger,
SchedulerEventListener listener)
Schedules a job under the specified name, that will be fired with the specified trigger, and by setting the specified listener to recieve the events mapped with the job execution state. |
void |
shutdown()
Shutdowns this scheduler. |
void |
unscheduleJob(String jobName)
Unschedules the job with the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected QuartzScheduler() throws SchedulerException
SchedulerException
- if the unerlying Quartz scheduler setting up fails.Method Detail |
---|
public ScheduledJob scheduleJob(String jobName, JobTrigger trigger, SchedulerEventListener listener) throws SchedulerException
Scheduler
scheduleJob
in interface Scheduler
jobName
- the name under which the job should be registered in this scheduler.trigger
- the trigger that will command the job execution in the timeline.listener
- a listener of scheduler's events. It will recieve the different events fired by
the scheduler and mapped with the job execution state. It is expected it will accomplish the
job itself at trigger firing. It is required.
SchedulerException
- if either a job is already scheduled under the specified name or if
the job scheduling fails.public ScheduledJob scheduleJob(Job theJob, JobTrigger trigger, SchedulerEventListener listener) throws SchedulerException
Scheduler
scheduleJob
in interface Scheduler
theJob
- the job to schedule.trigger
- the trigger that will fire the job execution.listener
- a listener of scheduler's events mapped with the state of the job execution.
Null means no listener to register with the job.
SchedulerException
- if either a job is already scheduled under the same name that the
specified job or if the job scheduling fails.public ScheduledJob scheduleJob(Job theJob, JobTrigger trigger) throws SchedulerException
Scheduler
scheduleJob
in interface Scheduler
theJob
- the job to schedule.trigger
- the trigger that will fire the job execution.
SchedulerException
- if either a job is already scheduled under the same name that the
specified job or if the job scheduling fails.public void unscheduleJob(String jobName) throws SchedulerException
Scheduler
unscheduleJob
in interface Scheduler
jobName
- the name of the job to unschedule.
SchedulerException
- if the specified job cannot be unscheduled.public boolean isJobScheduled(String jobName)
Scheduler
isJobScheduled
in interface Scheduler
jobName
- the job name.
public void shutdown() throws SchedulerException
Scheduler
shutdown
in interface Scheduler
SchedulerException
- if the scheduler shutdown failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |