org.quartz.core
Class ListenerManagerImpl

java.lang.Object
  extended by org.quartz.core.ListenerManagerImpl
All Implemented Interfaces:
ListenerManager

public class ListenerManagerImpl
extends java.lang.Object
implements ListenerManager


Constructor Summary
ListenerManagerImpl()
           
 
Method Summary
 void addJobListener(JobListener jobListener, java.util.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(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.
 void addSchedulerListener(SchedulerListener schedulerListener)
          Register the given SchedulerListener with the Scheduler.
 void addTriggerListener(TriggerListener triggerListener, java.util.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.
 void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey> matcher)
           
 boolean addTriggerListenerMatcher(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.
 JobListener getJobListener(java.lang.String name)
          Get the JobListener that has the given name.
 java.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 the JobListeners in the Scheduler.
 java.util.List<SchedulerListener> getSchedulerListeners()
          Get a List containing all of the SchedulerListeners registered with the Scheduler.
 TriggerListener getTriggerListener(java.lang.String name)
          Get the TriggerListener that has the given name.
 java.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 the TriggerListeners in the Scheduler.
 boolean removeJobListener(java.lang.String name)
          Remove the identified JobListener from the Scheduler.
 boolean removeJobListenerMatcher(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.
 boolean removeSchedulerListener(SchedulerListener schedulerListener)
          Remove the given SchedulerListener from the Scheduler.
 boolean removeTriggerListener(java.lang.String name)
          Remove the identified TriggerListener from the Scheduler.
 boolean removeTriggerListenerMatcher(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.
 boolean setJobListenerMatchers(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.
 boolean setTriggerListenerMatchers(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerManagerImpl

public ListenerManagerImpl()
Method Detail

addJobListener

public void addJobListener(JobListener jobListener,
                           Matcher<JobKey>... matchers)
Description copied from interface: ListenerManager
Add the given JobListener to the Scheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers. If no matchers are provided, the EverythingMatcher will be used.

Specified by:
addJobListener in interface ListenerManager
See Also:
Matcher, EverythingMatcher

addJobListener

public void addJobListener(JobListener jobListener,
                           java.util.List<Matcher<JobKey>> matchers)
Description copied from interface: ListenerManager
Add the given JobListener to the Scheduler, and register it to receive events for Jobs that are matched by ANY of the given Matchers. If no matchers are provided, the EverythingMatcher will be used.

Specified by:
addJobListener in interface ListenerManager
See Also:
Matcher, EverythingMatcher

addJobListenerMatcher

public boolean addJobListenerMatcher(java.lang.String listenerName,
                                     Matcher<JobKey> matcher)
Description copied from interface: ListenerManager
Add the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
addJobListenerMatcher in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matcher - 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: ListenerManager
Remove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
removeJobListenerMatcher in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matcher - 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: ListenerManager
Get the set of Matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
getJobListenerMatchers in interface ListenerManager
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: ListenerManager
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!

Specified by:
setJobListenerMatchers in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matchers - 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: ListenerManager
Remove the identified JobListener from the Scheduler.

Specified by:
removeJobListener in interface ListenerManager
Returns:
true if the identified listener was found in the list, and removed.

getJobListeners

public java.util.List<JobListener> getJobListeners()
Description copied from interface: ListenerManager
Get a List containing all of the JobListeners in the Scheduler.

Specified by:
getJobListeners in interface ListenerManager

getJobListener

public JobListener getJobListener(java.lang.String name)
Description copied from interface: ListenerManager
Get the JobListener that has the given name.

Specified by:
getJobListener in interface ListenerManager

addTriggerListener

public void addTriggerListener(TriggerListener triggerListener,
                               Matcher<TriggerKey>... matchers)
Description copied from interface: ListenerManager
Add the given TriggerListener to the Scheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers. If no matcher is provided, the EverythingMatcher will be used.

Specified by:
addTriggerListener in interface ListenerManager
See Also:
Matcher, EverythingMatcher

addTriggerListener

public void addTriggerListener(TriggerListener triggerListener,
                               java.util.List<Matcher<TriggerKey>> matchers)
Description copied from interface: ListenerManager
Add the given TriggerListener to the Scheduler, and register it to receive events for Triggers that are matched by ANY of the given Matchers. If no matcher is provided, the EverythingMatcher will be used.

Specified by:
addTriggerListener in interface ListenerManager
See Also:
Matcher, EverythingMatcher

addTriggerListener

public void addTriggerListener(TriggerListener triggerListener,
                               Matcher<TriggerKey> matcher)

addTriggerListenerMatcher

public boolean addTriggerListenerMatcher(java.lang.String listenerName,
                                         Matcher<TriggerKey> matcher)
Description copied from interface: ListenerManager
Add the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
addTriggerListenerMatcher in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matcher - 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: ListenerManager
Remove the given Matcher to the set of matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
removeTriggerListenerMatcher in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matcher - 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: ListenerManager
Get the set of Matchers for which the listener will receive events if ANY of the matchers match.

Specified by:
getTriggerListenerMatchers in interface ListenerManager
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: ListenerManager
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!

Specified by:
setTriggerListenerMatchers in interface ListenerManager
Parameters:
listenerName - the name of the listener to add the matcher to
matchers - 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: ListenerManager
Remove the identified TriggerListener from the Scheduler.

Specified by:
removeTriggerListener in interface ListenerManager
Returns:
true if the identified listener was found in the list, and removed.

getTriggerListeners

public java.util.List<TriggerListener> getTriggerListeners()
Description copied from interface: ListenerManager
Get a List containing all of the TriggerListeners in the Scheduler.

Specified by:
getTriggerListeners in interface ListenerManager

getTriggerListener

public TriggerListener getTriggerListener(java.lang.String name)
Description copied from interface: ListenerManager
Get the TriggerListener that has the given name.

Specified by:
getTriggerListener in interface ListenerManager

addSchedulerListener

public void addSchedulerListener(SchedulerListener schedulerListener)
Description copied from interface: ListenerManager
Register the given SchedulerListener with the Scheduler.

Specified by:
addSchedulerListener in interface ListenerManager

removeSchedulerListener

public boolean removeSchedulerListener(SchedulerListener schedulerListener)
Description copied from interface: ListenerManager
Remove the given SchedulerListener from the Scheduler.

Specified by:
removeSchedulerListener in interface ListenerManager
Returns:
true if the identified listener was found in the list, and removed.

getSchedulerListeners

public java.util.List<SchedulerListener> getSchedulerListeners()
Description copied from interface: ListenerManager
Get a List containing all of the SchedulerListeners registered with the Scheduler.

Specified by:
getSchedulerListeners in interface ListenerManager


Copyright 2001-2019, Terracotta, Inc.