|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.quartz Interface ListenerManager
- All Known Implementing Classes:
- ListenerManagerImpl
public interface ListenerManager
Client programs may be interested in the 'listener' interfaces that are
available from Quartz. The JobListener interface
provides notifications of Job executions. The
TriggerListener interface provides notifications of
Trigger firings. The SchedulerListener
interface provides notifications of Scheduler events and
errors. Listeners can be associated with local schedulers through the
ListenerManager interface.
- Since:
- 2.0 - previously listeners were managed directly on the Scheduler interface.
- Author:
- jhouse
| Method Summary | |
|---|---|
void |
addJobListener(JobListener jobListener,
List<Matcher<JobKey>> matchers)
Add the given JobListener to the Scheduler,
and register it to receive events for Jobs that are matched by ANY of the
given Matchers. |
void |
addJobListener(JobListener jobListener,
Matcher<JobKey>... matchers)
Add the given JobListener to the Scheduler,
and register it to receive events for Jobs that are matched by ANY of the
given Matchers. |
boolean |
addJobListenerMatcher(String listenerName,
Matcher<JobKey> matcher)
Add the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match. |
void |
addSchedulerListener(SchedulerListener schedulerListener)
Register the given SchedulerListener with the
Scheduler. |
void |
addTriggerListener(TriggerListener triggerListener,
List<Matcher<TriggerKey>> matchers)
Add the given TriggerListener to the Scheduler,
and register it to receive events for Triggers that are matched by ANY of the
given Matchers. |
void |
addTriggerListener(TriggerListener triggerListener,
Matcher<TriggerKey>... matchers)
Add the given TriggerListener to the Scheduler,
and register it to receive events for Triggers that are matched by ANY of the
given Matchers. |
boolean |
addTriggerListenerMatcher(String listenerName,
Matcher<TriggerKey> matcher)
Add the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match. |
JobListener |
getJobListener(String name)
Get the JobListener that has the given name. |
List<Matcher<JobKey>> |
getJobListenerMatchers(String listenerName)
Get the set of Matchers for which the listener will receive events if ANY of the matchers match. |
List<JobListener> |
getJobListeners()
Get a List containing all of the JobListeners in
the Scheduler. |
List<SchedulerListener> |
getSchedulerListeners()
Get a List containing all of the SchedulerListeners
registered with the Scheduler. |
TriggerListener |
getTriggerListener(String name)
Get the TriggerListener that has the given name. |
List<Matcher<TriggerKey>> |
getTriggerListenerMatchers(String listenerName)
Get the set of Matchers for which the listener will receive events if ANY of the matchers match. |
List<TriggerListener> |
getTriggerListeners()
Get a List containing all of the TriggerListeners
in the Scheduler. |
boolean |
removeJobListener(String name)
Remove the identified JobListener from the Scheduler. |
boolean |
removeJobListenerMatcher(String listenerName,
Matcher<JobKey> matcher)
Remove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match. |
boolean |
removeSchedulerListener(SchedulerListener schedulerListener)
Remove the given SchedulerListener from the
Scheduler. |
boolean |
removeTriggerListener(String name)
Remove the identified TriggerListener from the Scheduler. |
boolean |
removeTriggerListenerMatcher(String listenerName,
Matcher<TriggerKey> matcher)
Remove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match. |
boolean |
setJobListenerMatchers(String listenerName,
List<Matcher<JobKey>> matchers)
Set the set of Matchers for which the listener will receive events if ANY of the matchers match. |
boolean |
setTriggerListenerMatchers(String listenerName,
List<Matcher<TriggerKey>> matchers)
Set the set of Matchers for which the listener will receive events if ANY of the matchers match. |
| Method Detail |
|---|
addJobListener
void addJobListener(JobListener jobListener, Matcher<JobKey>... matchers)
- Add the given
JobListenerto theScheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers. If no matchers are provided, theEverythingMatcherwill be used. - See Also:
Matcher,EverythingMatcher
addJobListener
void addJobListener(JobListener jobListener, List<Matcher<JobKey>> matchers)
- Add the given
JobListenerto theScheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers. If no matchers are provided, theEverythingMatcherwill be used. - See Also:
Matcher,EverythingMatcher
addJobListenerMatcher
boolean addJobListenerMatcher(String listenerName, Matcher<JobKey> matcher)
- Add the given Matcher to the set of matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher tomatcher- the additional matcher to apply for selecting events- Returns:
- true if the identified listener was found and updated
- Throws:
SchedulerException
removeJobListenerMatcher
boolean removeJobListenerMatcher(String listenerName, Matcher<JobKey> matcher)
- Remove the given Matcher to the set of matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher tomatcher- the additional matcher to apply for selecting events- Returns:
- true if the given matcher was found and removed from the listener's list of matchers
- Throws:
SchedulerException
setJobListenerMatchers
boolean setJobListenerMatchers(String listenerName, List<Matcher<JobKey>> matchers)
- Set the set of Matchers for which the listener
will receive events if ANY of the matchers match.
Removes any existing matchers for the identified listener!
- Parameters:
listenerName- the name of the listener to add the matcher tomatchers- the matchers to apply for selecting events- Returns:
- true if the given matcher was found and removed from the listener's list of matchers
- Throws:
SchedulerException
getJobListenerMatchers
List<Matcher<JobKey>> getJobListenerMatchers(String listenerName)
- Get the set of Matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher to- Returns:
- the matchers registered for selecting events for the identified listener
- Throws:
SchedulerException
removeJobListener
boolean removeJobListener(String name)
- Remove the identified
JobListenerfrom theScheduler. - Returns:
- true if the identified listener was found in the list, and removed.
getJobListeners
List<JobListener> getJobListeners()
- Get a List containing all of the
JobListeners in theScheduler.
getJobListener
JobListener getJobListener(String name)
- Get the
JobListenerthat has the given name.
addTriggerListener
void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey>... matchers)
- Add the given
TriggerListenerto theScheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers. If no matcher is provided, theEverythingMatcherwill be used. - See Also:
Matcher,EverythingMatcher
addTriggerListener
void addTriggerListener(TriggerListener triggerListener, List<Matcher<TriggerKey>> matchers)
- Add the given
TriggerListenerto theScheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers. If no matcher is provided, theEverythingMatcherwill be used. - See Also:
Matcher,EverythingMatcher
addTriggerListenerMatcher
boolean addTriggerListenerMatcher(String listenerName, Matcher<TriggerKey> matcher)
- Add the given Matcher to the set of matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher tomatcher- the additional matcher to apply for selecting events- Returns:
- true if the identified listener was found and updated
- Throws:
SchedulerException
removeTriggerListenerMatcher
boolean removeTriggerListenerMatcher(String listenerName, Matcher<TriggerKey> matcher)
- Remove the given Matcher to the set of matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher tomatcher- the additional matcher to apply for selecting events- Returns:
- true if the given matcher was found and removed from the listener's list of matchers
- Throws:
SchedulerException
setTriggerListenerMatchers
boolean setTriggerListenerMatchers(String listenerName, List<Matcher<TriggerKey>> matchers)
- Set the set of Matchers for which the listener
will receive events if ANY of the matchers match.
Removes any existing matchers for the identified listener!
- Parameters:
listenerName- the name of the listener to add the matcher tomatchers- the matchers to apply for selecting events- Returns:
- true if the given matcher was found and removed from the listener's list of matchers
- Throws:
SchedulerException
getTriggerListenerMatchers
List<Matcher<TriggerKey>> getTriggerListenerMatchers(String listenerName)
- Get the set of Matchers for which the listener
will receive events if ANY of the matchers match.
- Parameters:
listenerName- the name of the listener to add the matcher to- Returns:
- the matchers registered for selecting events for the identified listener
- Throws:
SchedulerException
removeTriggerListener
boolean removeTriggerListener(String name)
- Remove the identified
TriggerListenerfrom theScheduler. - Returns:
- true if the identified listener was found in the list, and removed.
getTriggerListeners
List<TriggerListener> getTriggerListeners()
- Get a List containing all of the
TriggerListeners in theScheduler.
getTriggerListener
TriggerListener getTriggerListener(String name)
- Get the
TriggerListenerthat has the given name.
addSchedulerListener
void addSchedulerListener(SchedulerListener schedulerListener)
- Register the given
SchedulerListenerwith theScheduler.
removeSchedulerListener
boolean removeSchedulerListener(SchedulerListener schedulerListener)
- Remove the given
SchedulerListenerfrom theScheduler. - Returns:
- true if the identified listener was found in the list, and removed.
getSchedulerListeners
List<SchedulerListener> getSchedulerListeners()
- Get a List containing all of the
SchedulerListeners registered with theScheduler.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2001-2011, Terracotta, Inc.