|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.scheduler.quartz.QuartzSchedulerJob
public class QuartzSchedulerJob
The QuartzSchedulerJob is, as its name implies, a job that will be scheduled within the Quartz scheduler. For each job to schedule by the Scheduler API, a corresponding QuartzSchedulerJob instance is created and registered into the Quartz scheduler. This instance will wrap the actual job, so that when the Quartz scheduler will fire it, it will delegate the job execution to the wrapped job.
Constructor Summary | |
---|---|
protected |
QuartzSchedulerJob(Job jobToExecute,
JobTrigger trigger)
Constructs a new job for the Quartz scheduler. |
protected |
QuartzSchedulerJob(String name,
JobTrigger trigger)
Constructs a new job for the Quartz scheduler. |
Method Summary | |
---|---|
void |
execute(JobExecutionContext context)
Executes the job with the specified execution context. |
String |
getName()
Gets the name under which the job is registered into the scheduler. |
long |
getNexExecutionTimeInMillis()
Gets the next time in milliseconds at which the execution of this job will be fired. |
Date |
getNextExecutionTime()
Gets the next time at which the execution of this job will be fired. |
SchedulerEventListener |
getSchedulerEventListener()
Gets the listener of the scheduler's events mapped with the state of this job execution. |
JobTrigger |
getTrigger()
Gets the trigger responsible of firing the execution of this job. |
protected void |
setNextExecutionTime(Date executionTime)
Sets the next time at which this job will be executed. |
protected QuartzSchedulerJob |
withSchedulerEventListener(SchedulerEventListener listener)
Specifies a scheduler event listener that will recieve all of the events concerning this job. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected QuartzSchedulerJob(String name, JobTrigger trigger)
name
- the name of the scheduled job.trigger
- the trigger that will fire it.protected QuartzSchedulerJob(Job jobToExecute, JobTrigger trigger)
jobToExecute
- the job to execute at trigger firing.trigger
- the trigger that will fire it.Method Detail |
---|
protected QuartzSchedulerJob withSchedulerEventListener(SchedulerEventListener listener)
listener
- a scheduler event listener.
public String getName()
ScheduledJob
getName
in interface ScheduledJob
public JobTrigger getTrigger()
ScheduledJob
getTrigger
in interface ScheduledJob
public SchedulerEventListener getSchedulerEventListener()
ScheduledJob
getSchedulerEventListener
in interface ScheduledJob
public void execute(JobExecutionContext context) throws Exception
ScheduledJob
execute
in interface ScheduledJob
context
- the context under which this job is executed.
Exception
- if an error occurs during the job execution.public Date getNextExecutionTime()
ScheduledJob
getNextExecutionTime
in interface ScheduledJob
public long getNexExecutionTimeInMillis()
ScheduledJob
getNexExecutionTimeInMillis
in interface ScheduledJob
protected void setNextExecutionTime(Date executionTime)
executionTime
- the next job execution time.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |