Oracle神諭

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評(píng)論 :: 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世界暢談 閱讀(427) 評(píng)論(0)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 张家界市| 托克托县| 耿马| 闻喜县| 浦北县| 太湖县| 宜兴市| 宣恩县| 从江县| 介休市| 饶河县| 临邑县| 清远市| 军事| 武强县| 瓦房店市| 兰西县| 文登市| 万安县| 苏尼特右旗| 班戈县| 师宗县| 潼南县| 桦南县| 西宁市| 周口市| 承德市| 合阳县| 阜阳市| 永宁县| 景德镇市| 衡水市| 瑞金市| 临夏县| 万宁市| 克拉玛依市| 安徽省| 松阳县| 邹城市| 益阳市| 吉木萨尔县|