Class BroadcastTriggerListener

    • Constructor Detail

      • BroadcastTriggerListener

        public BroadcastTriggerListener​(java.lang.String name)
        Construct an instance with the given name. (Remember to add some delegate listeners!)
        Parameters:
        name - the name of this instance
      • BroadcastTriggerListener

        public BroadcastTriggerListener​(java.lang.String name,
                                        java.util.List<TriggerListener> listeners)
        Construct an instance with the given name, and List of listeners.
        Parameters:
        name - the name of this instance
        listeners - the initial List of TriggerListeners to broadcast to.
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: TriggerListener

        Get the name of the TriggerListener.

        Specified by:
        getName in interface TriggerListener
      • removeListener

        public boolean removeListener​(TriggerListener listener)
      • removeListener

        public boolean removeListener​(java.lang.String listenerName)
      • triggerFired

        public void triggerFired​(Trigger trigger,
                                 JobExecutionContext context)
        Description copied from interface: TriggerListener

        Called by the Scheduler when a Trigger has fired, and it's associated JobDetail is about to be executed.

        It is called before the vetoJobExecution(..) method of this interface.

        Specified by:
        triggerFired in interface TriggerListener
        Parameters:
        trigger - The Trigger that has fired.
        context - The JobExecutionContext that will be passed to the Job'sexecute(xx) method.
      • vetoJobExecution

        public boolean vetoJobExecution​(Trigger trigger,
                                        JobExecutionContext context)
        Description copied from interface: TriggerListener

        Called by the Scheduler when a Trigger has fired, and it's associated JobDetail is about to be executed. If the implementation vetoes the execution (via returning true), the job's execute method will not be called.

        It is called after the triggerFired(..) method of this interface.

        Specified by:
        vetoJobExecution in interface TriggerListener
        Parameters:
        trigger - The Trigger that has fired.
        context - The JobExecutionContext that will be passed to the Job'sexecute(xx) method.
      • triggerMisfired

        public void triggerMisfired​(Trigger trigger)
        Description copied from interface: TriggerListener

        Called by the Scheduler when a Trigger has misfired.

        Consideration should be given to how much time is spent in this method, as it will affect all triggers that are misfiring. If you have lots of triggers misfiring at once, it could be an issue it this method does a lot.

        Specified by:
        triggerMisfired in interface TriggerListener
        Parameters:
        trigger - The Trigger that has misfired.