public interface IListenerManager
IJobListener interface
provides notifications of Job executions. The
ITriggerListener interface provides notifications of
Trigger firings. The ISchedulerListener
interface provides notifications of Scheduler events and errors.
Listeners can be associated with local schedulers through the
IListenerManager interface.
Listener registration order is preserved, and hence notification of listeners will be in the order in which they were registered.
| Modifier and Type | Method and Description |
|---|---|
void |
addJobListener(IJobListener jobListener)
Add the given
to the
Scheduler, and register it to receive events for all Jobs. |
void |
addJobListener(IJobListener jobListener,
IMatcher<JobKey>... matchers)
Add the given
to the
Scheduler, and register it to receive events for Jobs that are
matched by ANY of the given Matchers. |
void |
addJobListener(IJobListener jobListener,
IMatcher<JobKey> matcher)
Add the given
to the
Scheduler, and register it to receive events for Jobs that are
matched by the given Matcher. |
void |
addJobListener(IJobListener jobListener,
List<IMatcher<JobKey>> matchers)
Add the given
to the
Scheduler, and register it to receive events for Jobs that are
matched by ANY of the given Matchers. |
boolean |
addJobListenerMatcher(String listenerName,
IMatcher<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(ISchedulerListener schedulerListener)
Register the given
with the
Scheduler. |
void |
addTriggerListener(ITriggerListener triggerListener)
Add the given
to the
Scheduler, and register it to receive events for all Triggers. |
void |
addTriggerListener(ITriggerListener triggerListener,
IMatcher<TriggerKey>... matchers)
Add the given
to the
Scheduler, and register it to receive events for Triggers that
are matched by ANY of the given Matchers. |
void |
addTriggerListener(ITriggerListener triggerListener,
IMatcher<TriggerKey> matcher)
Add the given
to the
Scheduler, and register it to receive events for Triggers that
are matched by the given Matcher. |
void |
addTriggerListener(ITriggerListener triggerListener,
List<IMatcher<TriggerKey>> matchers)
Add the given
to the
Scheduler, and register it to receive events for Triggers that
are matched by ANY of the given Matchers. |
boolean |
addTriggerListenerMatcher(String listenerName,
IMatcher<TriggerKey> matcher)
Add the given Matcher to the set of matchers for which the listener will
receive events if ANY of the matchers match.
|
IJobListener |
getJobListener(String name)
Get the
that has the given name. |
com.helger.commons.collection.impl.ICommonsList<IMatcher<JobKey>> |
getJobListenerMatchers(String listenerName)
Get the set of Matchers for which the listener will receive events if ANY
of the matchers match.
|
com.helger.commons.collection.impl.ICommonsList<IJobListener> |
getJobListeners()
Get a List containing all of the
s in the
Scheduler, in the order in which they were registered. |
com.helger.commons.collection.impl.ICommonsList<ISchedulerListener> |
getSchedulerListeners()
Get a List containing all of the
s
registered with the Scheduler, in the order in which they were
registered. |
ITriggerListener |
getTriggerListener(String name)
Get the
that has the given name. |
com.helger.commons.collection.impl.ICommonsList<IMatcher<TriggerKey>> |
getTriggerListenerMatchers(String listenerName)
Get the set of Matchers for which the listener will receive events if ANY
of the matchers match.
|
com.helger.commons.collection.impl.ICommonsList<ITriggerListener> |
getTriggerListeners()
Get a List containing all of the
s in
the Scheduler, in the order in which they were registered. |
boolean |
removeJobListener(String name)
Remove the identified
from the
Scheduler. |
boolean |
removeJobListenerMatcher(String listenerName,
IMatcher<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(ISchedulerListener schedulerListener)
Remove the given
from the
Scheduler. |
boolean |
removeTriggerListener(String name)
Remove the identified
from the
Scheduler. |
boolean |
removeTriggerListenerMatcher(String listenerName,
IMatcher<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<IMatcher<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<IMatcher<TriggerKey>> matchers)
Set the set of Matchers for which the listener will receive events if ANY
of the matchers match.
|
void addJobListener(IJobListener jobListener)
IJobListener to the
Scheduler, and register it to receive events for all Jobs.
Because no matchers are provided, the EverythingMatcher will
be used.IMatcher,
EverythingMatchervoid addJobListener(IJobListener jobListener, IMatcher<JobKey> matcher)
IJobListener to the
Scheduler, and register it to receive events for Jobs that are
matched by the given Matcher. If no matchers are provided, the
EverythingMatcher will be used.IMatcher,
EverythingMatchervoid addJobListener(IJobListener jobListener, IMatcher<JobKey>... matchers)
IJobListener 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.IMatcher,
EverythingMatchervoid addJobListener(IJobListener jobListener, List<IMatcher<JobKey>> matchers)
IJobListener 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.IMatcher,
EverythingMatcherboolean addJobListenerMatcher(String listenerName, IMatcher<JobKey> matcher)
listenerName - the name of the listener to add the matcher tomatcher - the additional matcher to apply for selecting eventsboolean removeJobListenerMatcher(String listenerName, IMatcher<JobKey> matcher)
listenerName - the name of the listener to add the matcher tomatcher - the additional matcher to apply for selecting eventsboolean setJobListenerMatchers(String listenerName, List<IMatcher<JobKey>> matchers)
Removes any existing matchers for the identified listener!
listenerName - the name of the listener to add the matcher tomatchers - the matchers to apply for selecting eventscom.helger.commons.collection.impl.ICommonsList<IMatcher<JobKey>> getJobListenerMatchers(String listenerName)
listenerName - the name of the listener to add the matcher toboolean removeJobListener(String name)
IJobListener from the
Scheduler.com.helger.commons.collection.impl.ICommonsList<IJobListener> getJobListeners()
IJobListeners in the
Scheduler, in the order in which they were registered.IJobListener getJobListener(String name)
IJobListener that has the given name.void addTriggerListener(ITriggerListener triggerListener)
ITriggerListener to the
Scheduler, and register it to receive events for all Triggers.
Because no matcher is provided, the EverythingMatcher will be
used.IMatcher,
EverythingMatchervoid addTriggerListener(ITriggerListener triggerListener, IMatcher<TriggerKey> matcher)
ITriggerListener to the
Scheduler, and register it to receive events for Triggers that
are matched by the given Matcher. If no matcher is provided, the
EverythingMatcher will be used.IMatcher,
EverythingMatchervoid addTriggerListener(ITriggerListener triggerListener, IMatcher<TriggerKey>... matchers)
ITriggerListener 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.IMatcher,
EverythingMatchervoid addTriggerListener(ITriggerListener triggerListener, List<IMatcher<TriggerKey>> matchers)
ITriggerListener 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.IMatcher,
EverythingMatcherboolean addTriggerListenerMatcher(String listenerName, IMatcher<TriggerKey> matcher)
listenerName - the name of the listener to add the matcher tomatcher - the additional matcher to apply for selecting eventsboolean removeTriggerListenerMatcher(String listenerName, IMatcher<TriggerKey> matcher)
listenerName - the name of the listener to add the matcher tomatcher - the additional matcher to apply for selecting eventsboolean setTriggerListenerMatchers(String listenerName, List<IMatcher<TriggerKey>> matchers)
Removes any existing matchers for the identified listener!
listenerName - the name of the listener to add the matcher tomatchers - the matchers to apply for selecting eventscom.helger.commons.collection.impl.ICommonsList<IMatcher<TriggerKey>> getTriggerListenerMatchers(String listenerName)
listenerName - the name of the listener to add the matcher toboolean removeTriggerListener(String name)
ITriggerListener from the
Scheduler.com.helger.commons.collection.impl.ICommonsList<ITriggerListener> getTriggerListeners()
ITriggerListeners in
the Scheduler, in the order in which they were registered.ITriggerListener getTriggerListener(String name)
ITriggerListener that has the given name.void addSchedulerListener(ISchedulerListener schedulerListener)
ISchedulerListener with the
Scheduler.boolean removeSchedulerListener(ISchedulerListener schedulerListener)
ISchedulerListener from the
Scheduler.com.helger.commons.collection.impl.ICommonsList<ISchedulerListener> getSchedulerListeners()
ISchedulerListeners
registered with the Scheduler, in the order in which they were
registered.Copyright © 2016–2021 Philip Helger. All rights reserved.