public class ListenerManagerImpl extends Object implements ListenerManager
Constructor and Description |
---|
ListenerManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addJobListener(JobListener jobListener)
Add the given
to the Scheduler ,
and register it to receive events for all Jobs. |
void |
addJobListener(JobListener jobListener,
List<Matcher<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(JobListener jobListener,
Matcher<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(JobListener jobListener,
Matcher<JobKey> matcher)
Add the given
to the Scheduler ,
and register it to receive events for Jobs that are matched by the
given Matcher. |
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
with the
Scheduler . |
void |
addTriggerListener(TriggerListener triggerListener)
Add the given
to the Scheduler ,
and register it to receive events for all Triggers. |
void |
addTriggerListener(TriggerListener triggerListener,
List<Matcher<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(TriggerListener triggerListener,
Matcher<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(TriggerListener triggerListener,
Matcher<TriggerKey> matcher)
Add the given
to the Scheduler ,
and register it to receive events for Triggers that are matched by the
given Matcher. |
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
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
s in
the Scheduler , in the order in which they were registered. |
List<SchedulerListener> |
getSchedulerListeners()
Get a List containing all of the
s
registered with the Scheduler , in the order in which they were registered. |
TriggerListener |
getTriggerListener(String name)
Get the
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
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,
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
from the
Scheduler . |
boolean |
removeTriggerListener(String name)
Remove the identified
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.
|
public void addJobListener(JobListener jobListener, Matcher<JobKey>... matchers)
ListenerManager
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.addJobListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addJobListener(JobListener jobListener, List<Matcher<JobKey>> matchers)
ListenerManager
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.addJobListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addJobListener(JobListener jobListener)
ListenerManager
JobListener
to the Scheduler
,
and register it to receive events for all Jobs.
Because no matchers are provided, the EverythingMatcher
will be used.addJobListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addJobListener(JobListener jobListener, Matcher<JobKey> matcher)
ListenerManager
JobListener
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.addJobListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public boolean addJobListenerMatcher(String listenerName, Matcher<JobKey> matcher)
ListenerManager
addJobListenerMatcher
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatcher
- the additional matcher to apply for selecting eventspublic boolean removeJobListenerMatcher(String listenerName, Matcher<JobKey> matcher)
ListenerManager
removeJobListenerMatcher
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatcher
- the additional matcher to apply for selecting eventspublic List<Matcher<JobKey>> getJobListenerMatchers(String listenerName)
ListenerManager
getJobListenerMatchers
in interface ListenerManager
listenerName
- the name of the listener to add the matcher topublic boolean setJobListenerMatchers(String listenerName, List<Matcher<JobKey>> matchers)
ListenerManager
Removes any existing matchers for the identified listener!
setJobListenerMatchers
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatchers
- the matchers to apply for selecting eventspublic boolean removeJobListener(String name)
ListenerManager
JobListener
from the Scheduler
.removeJobListener
in interface ListenerManager
public List<JobListener> getJobListeners()
ListenerManager
JobListener
s in
the Scheduler
, in the order in which they were registered.getJobListeners
in interface ListenerManager
public JobListener getJobListener(String name)
ListenerManager
JobListener
that has the given name.getJobListener
in interface ListenerManager
public void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey>... matchers)
ListenerManager
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.addTriggerListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addTriggerListener(TriggerListener triggerListener, List<Matcher<TriggerKey>> matchers)
ListenerManager
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.addTriggerListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addTriggerListener(TriggerListener triggerListener)
ListenerManager
TriggerListener
to the Scheduler
,
and register it to receive events for all Triggers.
Because no matcher is provided, the EverythingMatcher
will be used.addTriggerListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public void addTriggerListener(TriggerListener triggerListener, Matcher<TriggerKey> matcher)
ListenerManager
TriggerListener
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.addTriggerListener
in interface ListenerManager
Matcher
,
EverythingMatcher
public boolean addTriggerListenerMatcher(String listenerName, Matcher<TriggerKey> matcher)
ListenerManager
addTriggerListenerMatcher
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatcher
- the additional matcher to apply for selecting eventspublic boolean removeTriggerListenerMatcher(String listenerName, Matcher<TriggerKey> matcher)
ListenerManager
removeTriggerListenerMatcher
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatcher
- the additional matcher to apply for selecting eventspublic List<Matcher<TriggerKey>> getTriggerListenerMatchers(String listenerName)
ListenerManager
getTriggerListenerMatchers
in interface ListenerManager
listenerName
- the name of the listener to add the matcher topublic boolean setTriggerListenerMatchers(String listenerName, List<Matcher<TriggerKey>> matchers)
ListenerManager
Removes any existing matchers for the identified listener!
setTriggerListenerMatchers
in interface ListenerManager
listenerName
- the name of the listener to add the matcher tomatchers
- the matchers to apply for selecting eventspublic boolean removeTriggerListener(String name)
ListenerManager
TriggerListener
from the Scheduler
.removeTriggerListener
in interface ListenerManager
public List<TriggerListener> getTriggerListeners()
ListenerManager
TriggerListener
s
in the Scheduler
, in the order in which they were registered.getTriggerListeners
in interface ListenerManager
public TriggerListener getTriggerListener(String name)
ListenerManager
TriggerListener
that has the given name.getTriggerListener
in interface ListenerManager
public void addSchedulerListener(SchedulerListener schedulerListener)
ListenerManager
SchedulerListener
with the
Scheduler
.addSchedulerListener
in interface ListenerManager
public boolean removeSchedulerListener(SchedulerListener schedulerListener)
ListenerManager
SchedulerListener
from the
Scheduler
.removeSchedulerListener
in interface ListenerManager
public List<SchedulerListener> getSchedulerListeners()
ListenerManager
SchedulerListener
s
registered with the Scheduler
, in the order in which they were registered.getSchedulerListeners
in interface ListenerManager
Copyright 2001-2019, Terracotta, Inc.