|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.scheduler.trigger.JobTrigger
public abstract class JobTrigger
A trigger of a job execution. A job trigger specifies the time, regular or not, at which a job must be executed. A job trigger is a schema about the triggering of job executions. It is is used for actually scheduling a job in the scheduling backend. This class is an abstract one from which new job trigger can be defined. Currently two types of trigger is supported: a trigger with an Unix-like cron expression and another one with a simple periodicity.
Constructor Summary | |
---|---|
JobTrigger()
|
Method Summary | |
---|---|
abstract void |
accept(JobTriggerVisitor visitor)
Accepts the specified visitor to visit it. |
Date |
getStartDate()
Gets the date at which the trigger's scheduling should start. |
JobTrigger |
startAt(Date startDate)
Sets the date at which the trigger's scheduling should start. |
static JobTrigger |
triggerAt(String cron)
Creates a job trigger that will fire a job execution at given moments in time, defined by the specified cron expression. |
static JobTrigger |
triggerEvery(int time,
TimeUnit unit)
Creates a job trigger that will fire a job execution every the specified time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobTrigger()
Method Detail |
---|
public abstract void accept(JobTriggerVisitor visitor)
visitor
- the visitor to accept.public Date getStartDate()
public static JobTrigger triggerEvery(int time, TimeUnit unit)
public static JobTrigger triggerAt(String cron) throws ParseException
cron
- the Unix cron-like expression.
ParseException
- if the specified cron expression isn't valid.CronJobTrigger
public JobTrigger startAt(Date startDate)
startDate
- the job trigger's scheduling start date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |