zoukankan      html  css  js  c++  java
  • Quartz.NET笔记(八) SchedulerListeners

    SchedulerListeners are much like ITriggerListeners and IJobListeners, except they receive notification of events within the scheduler itself - not necessarily events related to a specific trigger or job.

    Scheduler-related events include: the addition of a job/trigger, the removal of a job/trigger, a serious error within the scheduler, notification of the scheduler being shutdown, and others.

    SchedulerListeners同TriggerListeners及JobListeners非常相似,SchedulerListeners只接收与特定trigger 或job无关的Scheduler自身事件通知。

    Scheduler相关的事件包括:增加job或者trigger,移除Job或者trigger, scheduler内部发生的错误,scheduler将被关闭的通知,以及其他。

    The ISchedulerListener Interface

     1 public interface ISchedulerListener
     2 {
     3     void JobScheduled(Trigger trigger);
     4 
     5     void JobUnscheduled(string triggerName, string triggerGroup);
     6 
     7     void TriggerFinalized(Trigger trigger);
     8 
     9     void TriggersPaused(string triggerName, string triggerGroup);
    10 
    11     void TriggersResumed(string triggerName, string triggerGroup);
    12 
    13     void JobsPaused(string jobName, string jobGroup);
    14 
    15     void JobsResumed(string jobName, string jobGroup);
    16 
    17     void SchedulerError(string msg, SchedulerException cause);
    18 
    19     void SchedulerShutdown();
    20 } 

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

    Adding a SchedulerListener:

    scheduler.ListenerManager.AddSchedulerListener(mySchedListener);
    

    Removing a SchedulerListener:

    scheduler.ListenerManager.RemoveSchedulerListener(mySchedListener);

    除了不分“全局”或者“非全局”监听器外,SchedulerListeners创建及注册的方法同其他监听器类型十分相同。所有实现Quartz.ISchedulerListener接口的对象都是SchedulerListeners。
  • 相关阅读:
    MFC 参考资料(转)
    .net core 下运行 supersocket
    C# 发送 get 请求
    aardio写的16进制解析库
    Tomcat部署springboot项目
    debian10 arm64架构下安装mysql或者mariadb
    javascript进行hex、base64、bytes[]、string的互转
    css蒙层
    js识别手机型号做业务判断
    transform方法适配页面大小
  • 原文地址:https://www.cnblogs.com/hzz521/p/5159802.html
Copyright © 2011-2022 走看看