Package org.quartz.core
Class ListenerManagerImpl
- java.lang.Object
-
- org.quartz.core.ListenerManagerImpl
-
- All Implemented Interfaces:
ListenerManager
public class ListenerManagerImpl extends java.lang.Object implements ListenerManager
-
-
Constructor Summary
Constructors Constructor Description ListenerManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJobListener(JobListener jobListener)Add the givento theJobListenerScheduler, and register it to receive events for all Jobs.voidaddJobListener(JobListener jobListener, java.util.List<Matcher<JobKey>> matchers)Add the givento theJobListenerScheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers.voidaddJobListener(JobListener jobListener, Matcher<JobKey> matcher)Add the givento theJobListenerScheduler, and register it to receive events for Jobs that are matched by the given Matcher.voidaddJobListener(JobListener jobListener, Matcher<JobKey>... matchers)Add the givento theJobListenerScheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers.booleanaddJobListenerMatcher(java.lang.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.voidaddSchedulerListener(SchedulerListener schedulerListener)Register the givenwith theSchedulerListenerScheduler.voidaddTriggerListener(TriggerListener triggerListener)Add the givento theTriggerListenerScheduler, and register it to receive events for all Triggers.voidaddTriggerListener(TriggerListener triggerListener, java.util.List<Matcher<TriggerKey>> matchers)Add the givento theTriggerListenerScheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers.voidaddTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey> matcher)Add the givento theTriggerListenerScheduler, and register it to receive events for Triggers that are matched by the given Matcher.voidaddTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey>... matchers)Add the givento theTriggerListenerScheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers.booleanaddTriggerListenerMatcher(java.lang.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.JobListenergetJobListener(java.lang.String name)Get thethat has the given name.JobListenerjava.util.List<Matcher<JobKey>>getJobListenerMatchers(java.lang.String listenerName)Get the set of Matchers for which the listener will receive events if ANY of the matchers match.java.util.List<JobListener>getJobListeners()Get a List containing all of thes in theJobListenerScheduler, in the order in which they were registered.java.util.List<SchedulerListener>getSchedulerListeners()Get a List containing all of thes registered with theSchedulerListenerScheduler, in the order in which they were registered.TriggerListenergetTriggerListener(java.lang.String name)Get thethat has the given name.TriggerListenerjava.util.List<Matcher<TriggerKey>>getTriggerListenerMatchers(java.lang.String listenerName)Get the set of Matchers for which the listener will receive events if ANY of the matchers match.java.util.List<TriggerListener>getTriggerListeners()Get a List containing all of thes in theTriggerListenerScheduler, in the order in which they were registered.booleanremoveJobListener(java.lang.String name)Remove the identifiedfrom theJobListenerScheduler.booleanremoveJobListenerMatcher(java.lang.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.booleanremoveSchedulerListener(SchedulerListener schedulerListener)Remove the givenfrom theSchedulerListenerScheduler.booleanremoveTriggerListener(java.lang.String name)Remove the identifiedfrom theTriggerListenerScheduler.booleanremoveTriggerListenerMatcher(java.lang.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.booleansetJobListenerMatchers(java.lang.String listenerName, java.util.List<Matcher<JobKey>> matchers)Set the set of Matchers for which the listener will receive events if ANY of the matchers match.booleansetTriggerListenerMatchers(java.lang.String listenerName, java.util.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
public void addJobListener(JobListener jobListener, Matcher<JobKey>... matchers)
Description copied from interface:ListenerManagerAdd the givento theJobListenerScheduler, 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.- Specified by:
addJobListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addJobListener
public void addJobListener(JobListener jobListener, java.util.List<Matcher<JobKey>> matchers)
Description copied from interface:ListenerManagerAdd the givento theJobListenerScheduler, 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.- Specified by:
addJobListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addJobListener
public void addJobListener(JobListener jobListener)
Description copied from interface:ListenerManagerAdd the givento theJobListenerScheduler, and register it to receive events for all Jobs. Because no matchers are provided, theEverythingMatcherwill be used.- Specified by:
addJobListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addJobListener
public void addJobListener(JobListener jobListener, Matcher<JobKey> matcher)
Description copied from interface:ListenerManagerAdd the givento theJobListenerScheduler, and register it to receive events for Jobs that are matched by the given Matcher. If no matchers are provided, theEverythingMatcherwill be used.- Specified by:
addJobListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addJobListenerMatcher
public boolean addJobListenerMatcher(java.lang.String listenerName, Matcher<JobKey> matcher)Description copied from interface:ListenerManagerAdd the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
addJobListenerMatcherin interfaceListenerManager- 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
-
removeJobListenerMatcher
public boolean removeJobListenerMatcher(java.lang.String listenerName, Matcher<JobKey> matcher)Description copied from interface:ListenerManagerRemove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
removeJobListenerMatcherin interfaceListenerManager- 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
-
getJobListenerMatchers
public java.util.List<Matcher<JobKey>> getJobListenerMatchers(java.lang.String listenerName)
Description copied from interface:ListenerManagerGet the set of Matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
getJobListenerMatchersin interfaceListenerManager- Parameters:
listenerName- the name of the listener to add the matcher to- Returns:
- the matchers registered for selecting events for the identified listener
-
setJobListenerMatchers
public boolean setJobListenerMatchers(java.lang.String listenerName, java.util.List<Matcher<JobKey>> matchers)Description copied from interface:ListenerManagerSet 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!
- Specified by:
setJobListenerMatchersin interfaceListenerManager- 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
-
removeJobListener
public boolean removeJobListener(java.lang.String name)
Description copied from interface:ListenerManagerRemove the identifiedfrom theJobListenerScheduler.- Specified by:
removeJobListenerin interfaceListenerManager- Returns:
- true if the identified listener was found in the list, and removed.
-
getJobListeners
public java.util.List<JobListener> getJobListeners()
Description copied from interface:ListenerManagerGet a List containing all of thes in theJobListenerScheduler, in the order in which they were registered.- Specified by:
getJobListenersin interfaceListenerManager
-
getJobListener
public JobListener getJobListener(java.lang.String name)
Description copied from interface:ListenerManagerGet thethat has the given name.JobListener- Specified by:
getJobListenerin interfaceListenerManager
-
addTriggerListener
public void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey>... matchers)
Description copied from interface:ListenerManagerAdd the givento theTriggerListenerScheduler, 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.- Specified by:
addTriggerListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addTriggerListener
public void addTriggerListener(TriggerListener triggerListener, java.util.List<Matcher<TriggerKey>> matchers)
Description copied from interface:ListenerManagerAdd the givento theTriggerListenerScheduler, 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.- Specified by:
addTriggerListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addTriggerListener
public void addTriggerListener(TriggerListener triggerListener)
Description copied from interface:ListenerManagerAdd the givento theTriggerListenerScheduler, and register it to receive events for all Triggers. Because no matcher is provided, theEverythingMatcherwill be used.- Specified by:
addTriggerListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addTriggerListener
public void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey> matcher)
Description copied from interface:ListenerManagerAdd the givento theTriggerListenerScheduler, and register it to receive events for Triggers that are matched by the given Matcher. If no matcher is provided, theEverythingMatcherwill be used.- Specified by:
addTriggerListenerin interfaceListenerManager- See Also:
Matcher,EverythingMatcher
-
addTriggerListenerMatcher
public boolean addTriggerListenerMatcher(java.lang.String listenerName, Matcher<TriggerKey> matcher)Description copied from interface:ListenerManagerAdd the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
addTriggerListenerMatcherin interfaceListenerManager- 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
-
removeTriggerListenerMatcher
public boolean removeTriggerListenerMatcher(java.lang.String listenerName, Matcher<TriggerKey> matcher)Description copied from interface:ListenerManagerRemove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
removeTriggerListenerMatcherin interfaceListenerManager- 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
-
getTriggerListenerMatchers
public java.util.List<Matcher<TriggerKey>> getTriggerListenerMatchers(java.lang.String listenerName)
Description copied from interface:ListenerManagerGet the set of Matchers for which the listener will receive events if ANY of the matchers match.- Specified by:
getTriggerListenerMatchersin interfaceListenerManager- Parameters:
listenerName- the name of the listener to add the matcher to- Returns:
- the matchers registered for selecting events for the identified listener
-
setTriggerListenerMatchers
public boolean setTriggerListenerMatchers(java.lang.String listenerName, java.util.List<Matcher<TriggerKey>> matchers)Description copied from interface:ListenerManagerSet 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!
- Specified by:
setTriggerListenerMatchersin interfaceListenerManager- 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
-
removeTriggerListener
public boolean removeTriggerListener(java.lang.String name)
Description copied from interface:ListenerManagerRemove the identifiedfrom theTriggerListenerScheduler.- Specified by:
removeTriggerListenerin interfaceListenerManager- Returns:
- true if the identified listener was found in the list, and removed.
-
getTriggerListeners
public java.util.List<TriggerListener> getTriggerListeners()
Description copied from interface:ListenerManagerGet a List containing all of thes in theTriggerListenerScheduler, in the order in which they were registered.- Specified by:
getTriggerListenersin interfaceListenerManager
-
getTriggerListener
public TriggerListener getTriggerListener(java.lang.String name)
Description copied from interface:ListenerManagerGet thethat has the given name.TriggerListener- Specified by:
getTriggerListenerin interfaceListenerManager
-
addSchedulerListener
public void addSchedulerListener(SchedulerListener schedulerListener)
Description copied from interface:ListenerManagerRegister the givenwith theSchedulerListenerScheduler.- Specified by:
addSchedulerListenerin interfaceListenerManager
-
removeSchedulerListener
public boolean removeSchedulerListener(SchedulerListener schedulerListener)
Description copied from interface:ListenerManagerRemove the givenfrom theSchedulerListenerScheduler.- Specified by:
removeSchedulerListenerin interfaceListenerManager- Returns:
- true if the identified listener was found in the list, and removed.
-
getSchedulerListeners
public java.util.List<SchedulerListener> getSchedulerListeners()
Description copied from interface:ListenerManagerGet a List containing all of thes registered with theSchedulerListenerScheduler, in the order in which they were registered.- Specified by:
getSchedulerListenersin interfaceListenerManager
-
-