Save This Page
Home » quartz-1.6.0 » org » quartz » listeners » [javadoc | source]
org.quartz.listeners
public class: FilterAndBroadcastJobListener [javadoc | source]
java.lang.Object
   org.quartz.listeners.FilterAndBroadcastJobListener

All Implemented Interfaces:
    JobListener

Holds a List of references to JobListener instances and broadcasts all events to them (in order) - if the event is not excluded via filtering (read on).

The broadcasting behavior of this listener to delegate listeners may be more convenient than registering all of the listeners directly with the Trigger, and provides the flexibility of easily changing which listeners get notified.

You may also register a number of Regular Expression patterns to match the events against. If one or more patterns are registered, the broadcast will only take place if the event applies to a job who's name/group matches one or more of the patterns.

Constructor:
 public FilterAndBroadcastJobListener(String name) 
    Construct an instance with the given name. (Remember to add some delegate listeners!)
    Parameters:
    name - the name of this instance
 public FilterAndBroadcastJobListener(String name,
    List listeners) 
    Construct an instance with the given name, and List of listeners.
    Parameters:
    name - the name of this instance
    listeners - the initial List of JobListeners to broadcast to.
Method from org.quartz.listeners.FilterAndBroadcastJobListener Summary:
addJobGroupPattern,   addJobNamePattern,   addListener,   getJobGroupPatterns,   getJobNamePatterns,   getListeners,   getName,   jobExecutionVetoed,   jobToBeExecuted,   jobWasExecuted,   removeListener,   removeListener,   shouldDispatch
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.listeners.FilterAndBroadcastJobListener Detail:
 public  void addJobGroupPattern(String regularExpression) 
    If one or more group patterns are specified, only events relating to jobs who's group matches the given regular expression pattern will be dispatched to the delegate listeners.
 public  void addJobNamePattern(String regularExpression) 
    If one or more name patterns are specified, only events relating to jobs who's name matches the given regular expression pattern will be dispatched to the delegate listeners.
 public  void addListener(JobListener listener) 
 public List getJobGroupPatterns() 
 public List getJobNamePatterns() 
 public List getListeners() 
 public String getName() 
 public  void jobExecutionVetoed(JobExecutionContext context) 
 public  void jobToBeExecuted(JobExecutionContext context) 
 public  void jobWasExecuted(JobExecutionContext context,
    JobExecutionException jobException) 
 public boolean removeListener(JobListener listener) 
 public boolean removeListener(String listenerName) 
 protected boolean shouldDispatch(JobExecutionContext context)