|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.scheduler.simple.SimpleScheduler
@Deprecated public class SimpleScheduler
A simple scheduler implementation. It provides a easy way to schedule jobs at given moments in
time. The job execution policy is provided by a job trigger, represented as a
JobTrigger
object; JobTrigger
objects control when the job has to be
executed in a repeatedly way. The execution of the job itself can be actually performed in two
ways:
Job
object that wraps the execution code.
Constructor Summary | |
---|---|
protected |
SimpleScheduler()
Deprecated. The constructor is private because it will be created internal. |
Method Summary | |
---|---|
boolean |
isJobScheduled(String jobName)
Deprecated. Is the job identified by the specified name is scheduled by this scheduler? |
ScheduledJob |
scheduleJob(Job theJob,
JobTrigger trigger)
Deprecated. Schedules the specified job. |
ScheduledJob |
scheduleJob(Job theJob,
JobTrigger trigger,
SchedulerEventListener listener)
Deprecated. Schedules the specified job. |
ScheduledJob |
scheduleJob(String jobName,
JobTrigger trigger,
SchedulerEventListener listener)
Deprecated. 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()
Deprecated. This method kills all active jobs. |
void |
unscheduleJob(String jobName)
Deprecated. 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 SimpleScheduler()
Method Detail |
---|
public boolean isJobScheduled(String jobName)
isJobScheduled
in interface Scheduler
jobName
- the job name.
public void unscheduleJob(String jobName)
unscheduleJob
in interface Scheduler
jobName
- the name of the job to unschedule.public void shutdown()
shutdown
in interface Scheduler
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |