public class BroadcastSchedulerListener extends java.lang.Object implements SchedulerListener
This may be more convenient than registering all of the listeners directly with the Scheduler, and provides the flexibility of easily changing which listeners get notified.
addListener(org.quartz.SchedulerListener),
removeListener(org.quartz.SchedulerListener)| Constructor and Description |
|---|
BroadcastSchedulerListener() |
BroadcastSchedulerListener(java.util.List listeners)
Construct an instance with the given List of listeners.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(SchedulerListener listener) |
java.util.List |
getListeners() |
void |
jobScheduled(Trigger trigger)
|
void |
jobsPaused(java.lang.String jobName,
java.lang.String jobGroup)
|
void |
jobsResumed(java.lang.String jobName,
java.lang.String jobGroup)
|
void |
jobUnscheduled(java.lang.String triggerName,
java.lang.String triggerGroup)
|
boolean |
removeListener(SchedulerListener listener) |
void |
schedulerError(java.lang.String msg,
SchedulerException cause)
Called by the
when a serious error has
occured within the scheduler - such as repeated failures in the JobStore,
or the inability to instantiate a Job instance when its
Trigger has fired. |
void |
schedulerShutdown()
Called by the
to inform the listener
that it has shutdown. |
void |
triggerFinalized(Trigger trigger)
|
void |
triggersPaused(java.lang.String triggerName,
java.lang.String triggerGroup)
|
void |
triggersResumed(java.lang.String triggerName,
java.lang.String triggerGroup)
|
public BroadcastSchedulerListener()
public BroadcastSchedulerListener(java.util.List listeners)
listeners - the initial List of SchedulerListeners to broadcast to.public void addListener(SchedulerListener listener)
public boolean removeListener(SchedulerListener listener)
public java.util.List getListeners()
public void jobScheduled(Trigger trigger)
SchedulerListenerjobScheduled in interface SchedulerListenerpublic void jobUnscheduled(java.lang.String triggerName,
java.lang.String triggerGroup)
SchedulerListenerjobUnscheduled in interface SchedulerListenerpublic void triggerFinalized(Trigger trigger)
SchedulerListenertriggerFinalized in interface SchedulerListenerpublic void triggersPaused(java.lang.String triggerName,
java.lang.String triggerGroup)
SchedulerListener
Called by the when a Scheduler
or group of Trigger has been paused.
Triggers
If a group was paused, then the triggerName parameter
will be null.
triggersPaused in interface SchedulerListenerpublic void triggersResumed(java.lang.String triggerName,
java.lang.String triggerGroup)
SchedulerListener
Called by the when a Scheduler
or group of Trigger has been un-paused.
Triggers
If a group was resumed, then the triggerName parameter
will be null.
triggersResumed in interface SchedulerListenerpublic void jobsPaused(java.lang.String jobName,
java.lang.String jobGroup)
SchedulerListener
Called by the when a Scheduler
or group of JobDetail has been
paused.
JobDetails
If a group was paused, then the jobName parameter will be
null. If all jobs were paused, then both parameters will be null.
jobsPaused in interface SchedulerListenerpublic void jobsResumed(java.lang.String jobName,
java.lang.String jobGroup)
SchedulerListener
Called by the when a Scheduler
or group of JobDetail has been
un-paused.
JobDetails
If a group was resumed, then the jobName parameter will
be null. If all jobs were paused, then both parameters will be null.
jobsResumed in interface SchedulerListenerpublic void schedulerError(java.lang.String msg,
SchedulerException cause)
SchedulerListener
Called by the when a serious error has
occured within the scheduler - such as repeated failures in the SchedulerJobStore,
or the inability to instantiate a Job instance when its
Trigger has fired.
The getErrorCode() method of the given SchedulerException
can be used to determine more specific information about the type of
error that was encountered.
schedulerError in interface SchedulerListenerpublic void schedulerShutdown()
SchedulerListener
Called by the to inform the listener
that it has shutdown.
Scheduler
schedulerShutdown in interface SchedulerListener