Oracle神諭

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

          TriggerListeners and JobListeners
          Listeners are objects that you create to perform actions based on events occuring within the scheduler. As you can probably guess, TriggerListeners receive events related to trigger,and JobListners receive events related to jobs.

          Trigger-related events include: trigger firings,trigger mis-firings(discussed in the "Triggers" sections of this document),and trigger completions (the jobs fired off by the trigger is finished).

          To create a listener,simply create an object the implements either the org.quartz.TriggerListener and/or org.quartz.JobListener interface. Listeners are then registered with the scheduler during run time ,and must be given a name(or rather ,they must advertise their own name via their getName()method.  Listeners can be registered as either "global" or "non-global". Global listeners receive events for ALL triggers/jobs, and non-global listeners receive events only for the specific triggers/jobs that explicitely name the listener in their getTriggerListenerNames() or getJobListenerNames() properties.

           scheduler.addGlobalJobListener(myJobListener);
          or
           scheudler.addJobListener(myJobListener);
           
          Listeners are not used by most users of Quartz,but are handy when application requirements create the need for the notification of events,without the Job itself explicitly nofifying the application.

          posted on 2005-07-20 21:27 java世界暢談 閱讀(420) 評論(0)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 永城市| 镇宁| 左贡县| 那坡县| 焉耆| 昌吉市| 黑河市| 莆田市| 仙桃市| 六枝特区| 东兰县| 杨浦区| 鸡泽县| 奉节县| 张家港市| 兴隆县| 南充市| 循化| 无为县| 库伦旗| 枣阳市| 寿阳县| 东山县| 沾益县| 特克斯县| 莱阳市| 金堂县| 麟游县| 微博| 卢龙县| 吴堡县| 南郑县| 天水市| 镇坪县| 酒泉市| 简阳市| 咸宁市| 塘沽区| 石泉县| 全南县| 辽中县|