|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.scheduler.simple.SchedulerJob
@Deprecated public abstract class SchedulerJob
This is the base class of all scheduler job classes. This class is abstract. If you will implement your own special job class, you have to overrite the method 'execute' and add your own job generation method in the class 'SimpleScheduler'
Field Summary | |
---|---|
protected Format |
logDateFormat
Deprecated. |
Constructor Summary | |
---|---|
protected |
SchedulerJob(SimpleScheduler aController,
SchedulerEventListener aOwner,
String aJobName)
Deprecated. The constructor has proteceted access, because the generation of jobs should be done in a central way by the class 'SimpleScheduler' |
Method Summary | |
---|---|
protected abstract void |
execute(Date theExecutionDate)
Deprecated. This method holds the logic of the job. |
void |
execute(JobExecutionContext context)
Deprecated. Executes the job with the specified execution context. |
String |
getJobName()
Deprecated. This method returns the name of the job |
protected long |
getMillisecondsOfCalendar(Calendar aCalendar)
Deprecated. Wraps calender date access |
String |
getName()
Deprecated. Gets the name under which the job is registered into the scheduler. |
long |
getNexExecutionTimeInMillis()
Deprecated. Gets the next time in milliseconds at which the execution of this job will be fired. |
Date |
getNextExecutionTime()
Deprecated. Gets the next time at which the execution of this job will be fired. |
protected long |
getNextTimeStamp()
Deprecated. Generates a new timestamp |
SchedulerEventListener |
getOwner()
Deprecated. This method returns the owner (or creator) of the job |
SchedulerEventListener |
getSchedulerEventListener()
Deprecated. Gets the listener of the scheduler's events mapped with the state of this job execution. |
JobTrigger |
getTrigger()
Deprecated. Gets the trigger responsible of firing the execution of this job. |
void |
initTimeStamp(long nextTime)
Deprecated. |
long |
readNextTimeStamp()
Deprecated. |
void |
run()
Deprecated. This method handles the thread execution |
protected void |
setSchedulingParameter(CronJobTrigger trigger)
Deprecated. This method sets the scheduling parameter. |
protected void |
setSchedulingParameter(List<Integer> startMinutes,
List<Integer> startHours,
List<Integer> startDaysOfMonth,
List<Integer> startMonths,
List<Integer> startDaysOfWeek)
Deprecated. This method sets the scheduling parameter. |
protected void |
setTrigger(JobTrigger trigger)
Deprecated. |
void |
stop()
Deprecated. Stops the scheduling of the job |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Format logDateFormat
Constructor Detail |
---|
protected SchedulerJob(SimpleScheduler aController, SchedulerEventListener aOwner, String aJobName) throws SchedulerException
aController
- The controller, that controls all job executionsaOwner
- The owner of the jobaJobName
- The name of the jobaLogBaseFile
- The log file for the job
SchedulerException
Method Detail |
---|
public SchedulerEventListener getOwner()
public void initTimeStamp(long nextTime)
public long readNextTimeStamp()
public Date getNextExecutionTime()
ScheduledJob
getNextExecutionTime
in interface ScheduledJob
public long getNexExecutionTimeInMillis()
ScheduledJob
getNexExecutionTimeInMillis
in interface ScheduledJob
public String getJobName()
public void run()
run
in interface Runnable
public void stop()
protected abstract void execute(Date theExecutionDate) throws SchedulerException
log
- A PrintStream for text writings in the log file for this jobtheExecutionDate
- The date of the execution
SchedulerException
protected void setSchedulingParameter(List<Integer> startMinutes, List<Integer> startHours, List<Integer> startDaysOfMonth, List<Integer> startMonths, List<Integer> startDaysOfWeek) throws SchedulerException
startMinutes
- A list of minutes (0-59)startHours
- A list of hours (0-23)startDaysOfMonth
- A list of days of a month (1-31)startMonths
- A list of months (1-12; starts with 1 for January)startDaysOfWeek
- A list of day of a week (0-6; starts with 0 for Sunday)
SchedulerException
protected void setSchedulingParameter(CronJobTrigger trigger) throws SchedulerException
aCronString
-
SchedulerException
protected long getNextTimeStamp()
protected long getMillisecondsOfCalendar(Calendar aCalendar)
aCalendar
-
public String getName()
ScheduledJob
getName
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 SchedulerEventListener getSchedulerEventListener()
ScheduledJob
getSchedulerEventListener
in interface ScheduledJob
public JobTrigger getTrigger()
ScheduledJob
getTrigger
in interface ScheduledJob
protected void setTrigger(JobTrigger trigger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |