public class BroadcastSchedulerListener extends 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(List<SchedulerListener> listeners)
Construct an instance with the given List of listeners.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(SchedulerListener listener) |
List<SchedulerListener> |
getListeners() |
void |
jobAdded(JobDetail jobDetail)
|
void |
jobDeleted(JobKey jobKey)
|
void |
jobPaused(JobKey key)
|
void |
jobResumed(JobKey key)
|
void |
jobScheduled(Trigger trigger)
|
void |
jobsPaused(String jobGroup)
|
void |
jobsResumed(String jobGroup)
|
void |
jobUnscheduled(TriggerKey triggerKey)
|
boolean |
removeListener(SchedulerListener listener) |
void |
schedulerError(String msg,
SchedulerException cause)
Called by the
when a serious error has
occurred within the scheduler - such as repeated failures in the JobStore ,
or the inability to instantiate a Job instance when its
Trigger has fired. |
void |
schedulerInStandbyMode()
Called by the
to inform the listener
that it has move to standby mode. |
void |
schedulerShutdown()
Called by the
to inform the listener
that it has shutdown. |
void |
schedulerShuttingdown()
Called by the
to inform the listener
that it has begun the shutdown sequence. |
void |
schedulerStarted()
Called by the
to inform the listener
that it has started. |
void |
schedulerStarting()
Called by the
to inform the listener
that it is starting. |
void |
schedulingDataCleared()
Called by the
to inform the listener
that all jobs, triggers and calendars were deleted. |
void |
triggerFinalized(Trigger trigger)
|
void |
triggerPaused(TriggerKey key)
|
void |
triggerResumed(TriggerKey key)
|
void |
triggersPaused(String triggerGroup)
|
void |
triggersResumed(String triggerGroup)
|
public BroadcastSchedulerListener()
public BroadcastSchedulerListener(List<SchedulerListener> listeners)
listeners
- the initial List of SchedulerListeners to broadcast to.public void addListener(SchedulerListener listener)
public boolean removeListener(SchedulerListener listener)
public List<SchedulerListener> getListeners()
public void jobAdded(JobDetail jobDetail)
SchedulerListener
jobAdded
in interface SchedulerListener
public void jobDeleted(JobKey jobKey)
SchedulerListener
jobDeleted
in interface SchedulerListener
public void jobScheduled(Trigger trigger)
SchedulerListener
jobScheduled
in interface SchedulerListener
public void jobUnscheduled(TriggerKey triggerKey)
SchedulerListener
jobUnscheduled
in interface SchedulerListener
SchedulerListener.schedulingDataCleared()
public void triggerFinalized(Trigger trigger)
SchedulerListener
triggerFinalized
in interface SchedulerListener
public void triggerPaused(TriggerKey key)
SchedulerListener
triggerPaused
in interface SchedulerListener
public void triggersPaused(String triggerGroup)
SchedulerListener
Called by the
when a
group of Scheduler
has been paused.
Trigger
s
If all groups were paused then triggerGroup will be null
triggersPaused
in interface SchedulerListener
triggerGroup
- the paused group, or null if all were pausedpublic void triggerResumed(TriggerKey key)
SchedulerListener
triggerResumed
in interface SchedulerListener
public void triggersResumed(String triggerGroup)
SchedulerListener
triggersResumed
in interface SchedulerListener
public void schedulingDataCleared()
SchedulerListener
Scheduler
to inform the listener
that all jobs, triggers and calendars were deleted.schedulingDataCleared
in interface SchedulerListener
public void jobPaused(JobKey key)
SchedulerListener
jobPaused
in interface SchedulerListener
public void jobsPaused(String jobGroup)
SchedulerListener
jobsPaused
in interface SchedulerListener
jobGroup
- the paused group, or null if all were pausedpublic void jobResumed(JobKey key)
SchedulerListener
jobResumed
in interface SchedulerListener
public void jobsResumed(String jobGroup)
SchedulerListener
jobsResumed
in interface SchedulerListener
public void schedulerError(String msg, SchedulerException cause)
SchedulerListener
Called by the
when a serious error has
occurred within the scheduler - such as repeated failures in the Scheduler
JobStore
,
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 SchedulerListener
public void schedulerStarted()
SchedulerListener
Called by the
to inform the listener
that it has started.
Scheduler
schedulerStarted
in interface SchedulerListener
public void schedulerStarting()
SchedulerListener
Called by the
to inform the listener
that it is starting.
Scheduler
schedulerStarting
in interface SchedulerListener
public void schedulerInStandbyMode()
SchedulerListener
Called by the
to inform the listener
that it has move to standby mode.
Scheduler
schedulerInStandbyMode
in interface SchedulerListener
public void schedulerShutdown()
SchedulerListener
Called by the
to inform the listener
that it has shutdown.
Scheduler
schedulerShutdown
in interface SchedulerListener
public void schedulerShuttingdown()
SchedulerListener
Called by the
to inform the listener
that it has begun the shutdown sequence.
Scheduler
schedulerShuttingdown
in interface SchedulerListener
Copyright 2001-2019, Terracotta, Inc.