|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.scheduler.SchedulerEvent
public class SchedulerEvent
A scheduler event represents an event that is generated within the scheduling system and that is dispatched by schedulers to registered event listeners. A scheduler event is generated each time a state change occurs in the scheduling system machinery and the event carries information about this state change. A state change occurs in the scheduling system in the following situation:
| Nested Class Summary | |
|---|---|
static class |
SchedulerEvent.Type
The different possible types of an event send by the scheduler. |
| Constructor Summary | |
|---|---|
protected |
SchedulerEvent(SchedulerEvent.Type aType,
JobExecutionContext aContext)
Constructs a scheduler event. |
| Method Summary | |
|---|---|
JobExecutionContext |
getJobExecutionContext()
Gets the context of a job execution. |
Throwable |
getJobThrowable()
Gets the throwable object that was thrown during a job execution and that carries the job failure. |
SchedulerEvent.Type |
getType()
This method returns the event type |
boolean |
isExceptionThrown()
Is an exception thrown during a job execution? |
static SchedulerEvent |
jobFailed(JobExecutionContext context,
Throwable throwable)
Creates a new scheduler event about a failure of a job execution. |
static SchedulerEvent |
jobSucceeded(JobExecutionContext context)
Creates a new scheduler event about a success of a job execution. |
protected void |
setThrowable(Throwable aThrowable)
|
static SchedulerEvent |
triggerFired(JobExecutionContext context)
Creates a new scheduler event about a trigger firing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SchedulerEvent(SchedulerEvent.Type aType,
JobExecutionContext aContext)
aType - The type of the eventaJob - The job, which is the source for the event| Method Detail |
|---|
public static SchedulerEvent triggerFired(JobExecutionContext context)
the - context of the job to be executed.
public static SchedulerEvent jobSucceeded(JobExecutionContext context)
the - context of the completed execution of a job.
public static SchedulerEvent jobFailed(JobExecutionContext context,
Throwable throwable)
context - the context of the failed execution of a job.throwable - the Throwable object carrying the job failure.
public SchedulerEvent.Type getType()
public boolean isExceptionThrown()
public Throwable getJobThrowable()
public JobExecutionContext getJobExecutionContext()
protected void setThrowable(Throwable aThrowable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||