org.quartz.Trigger.getTriggerListenerNames()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(183)

本文整理了Java中org.quartz.Trigger.getTriggerListenerNames()方法的一些代码示例,展示了Trigger.getTriggerListenerNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.getTriggerListenerNames()方法的具体详情如下:
包路径:org.quartz.Trigger
类名称:Trigger
方法名:getTriggerListenerNames

Trigger.getTriggerListenerNames介绍

[英]Returns an array of String containing the names of all TriggerListeners assigned to the Trigger, in the order in which they should be notified.
[中]返回一个String数组,其中包含分配给Trigger的所有TriggerListener的名称,按通知顺序排列。

代码示例

代码示例来源:origin: quartz/quartz-all

public void notifyTriggerListenersMisfired(Trigger trigger)
  throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(trigger
      .getTriggerListenerNames());
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerMisfired(trigger);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

public void notifyTriggerListenersMisfired(Trigger trigger)
  throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(trigger
      .getTriggerListenerNames());
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerMisfired(trigger);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
}

代码示例来源:origin: quartz/quartz-all

public void notifyTriggerListenersComplete(JobExecutionContext jec,
    int instCode) throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(jec.getTrigger()
      .getTriggerListenerNames());
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerComplete(jec.getTrigger(), jec, instCode);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

public void notifyTriggerListenersComplete(JobExecutionContext jec,
    int instCode) throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(jec.getTrigger()
      .getTriggerListenerNames());
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerComplete(jec.getTrigger(), jec, instCode);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: quartz/quartz-all

String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: quartz/quartz-all

deleteTriggerListeners(conn, trigger.getName(), trigger.getGroup());
String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

deleteTriggerListeners(conn, trigger.getName(), trigger.getGroup());
String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: quartz/quartz-all

public boolean notifyTriggerListenersFired(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(jec.getTrigger()
      .getTriggerListenerNames());
  boolean vetoedExecution = false;
  
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerFired(jec.getTrigger(), jec);
      
      if(tl.vetoJobExecution(jec.getTrigger(), jec)) {
        vetoedExecution = true;
      }
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
  
  return vetoedExecution;
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

public boolean notifyTriggerListenersFired(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all trigger listeners that are to be notified...
  List triggerListeners = buildTriggerListenerList(jec.getTrigger()
      .getTriggerListenerNames());
  boolean vetoedExecution = false;
  
  // notify all trigger listeners in the list
  java.util.Iterator itr = triggerListeners.iterator();
  while (itr.hasNext()) {
    TriggerListener tl = (TriggerListener) itr.next();
    try {
      tl.triggerFired(jec.getTrigger(), jec);
      
      if(tl.vetoJobExecution(jec.getTrigger(), jec)) {
        vetoedExecution = true;
      }
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "TriggerListener '" + tl.getName()
              + "' threw exception: " + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_TRIGGER_LISTENER);
      throw se;
    }
  }
  
  return vetoedExecution;
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: quartz/quartz-all

String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

deleteTriggerListeners(conn, trigger.getName(), trigger.getGroup());
String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

代码示例来源:origin: quartz/quartz-all

deleteTriggerListeners(conn, trigger.getName(), trigger.getGroup());
String[] trigListeners = trigger.getTriggerListenerNames();
for (int i = 0; trigListeners != null && i < trigListeners.length; i++) {
  insertTriggerListener(conn, trigger, trigListeners[i]);

相关文章