zoukankan      html  css  js  c++  java
  • Quartz Scheduler(2.2.1)

    SchedulerListeners

    SchedulerListeners are much like TriggerListeners and JobListeners, except they receive notification of events within the Scheduler itself, not necessarily events related to a specific trigger or job.

    Among other events, Scheduler-related events include:

    *The addition of a job or trigger
    *The removal of a job or trigger
    *A serious error within the Scheduler
    *The shutdown of the Scheduler

    SchedulerListeners are registered with the scheduler's ListenerManager. SchedulerListeners can be virtually any object that implements the org.quartz.SchedulerListener interface.

    The org.quartz.SchedulerListener Interface

    public interface SchedulerListener { 
        public void jobScheduled(Trigger trigger); 
        public void jobUnscheduled(String triggerName, String triggerGroup); 
        public void triggerFinalized(Trigger trigger); 
        public void triggersPaused(String triggerName, String triggerGroup); 
        public void triggersResumed(String triggerName, String triggerGroup); 
        public void jobsPaused(String jobName, String jobGroup); 
        public void jobsResumed(String jobName, String jobGroup); 
        public void schedulerError(String msg, SchedulerException cause); 
        public void schedulerStarted(); 
         
        public void schedulerInStandbyMode(); 
        public void schedulerShutdown(); 
        public void schedulingDataCleared(); 
    }

    Adding a SchedulerListener

    scheduler.getListenerManager().addSchedulerListener(mySchedListener);

    Removing a SchedulerListener

    scheduler.getListenerManager().removeSchedulerListener(mySchedListener);
  • 相关阅读:
    第六周上机任务
    java第四次作业
    第二次上机练习
    第三周作业
    第一次上机作业
    计算机1802刘思源
    第五次上机作业
    第六周作业
    第四次上机作业
    第三次上机作业
  • 原文地址:https://www.cnblogs.com/huey/p/5109039.html
Copyright © 2011-2022 走看看