org.quartz.core.QuartzScheduler.buildJobListenerList()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(63)

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

QuartzScheduler.buildJobListenerList介绍

暂无

代码示例

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

public void notifyJobListenersWasVetoed(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobExecutionVetoed(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
          + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasVetoed(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobExecutionVetoed(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
          + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasExecuted(JobExecutionContext jec,
    JobExecutionException je) throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobWasExecuted(jec, je);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasExecuted(JobExecutionContext jec,
    JobExecutionException je) throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobWasExecuted(jec, je);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobToBeExecuted(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List<JobListener> jobListeners = buildJobListenerList();
  // notify all job listeners
  for(JobListener jl: jobListeners) {
    try {
      if(!matchJobListener(jl, jec.getJobDetail().getKey()))
        continue;
      jl.jobToBeExecuted(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasExecuted(JobExecutionContext jec,
    JobExecutionException je) throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobWasExecuted(jec, je);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

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

public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobToBeExecuted(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasExecuted(JobExecutionContext jec,
    JobExecutionException je) throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobWasExecuted(jec, je);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasVetoed(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobExecutionVetoed(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
          + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

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

public void notifyJobListenersWasVetoed(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobExecutionVetoed(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
          + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

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

public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
  throws SchedulerException {
  // build a list of all job listeners that are to be notified...
  List jobListeners = buildJobListenerList(jec.getJobDetail()
      .getJobListenerNames());
  // notify all job listeners
  java.util.Iterator itr = jobListeners.iterator();
  while (itr.hasNext()) {
    JobListener jl = (JobListener) itr.next();
    try {
      jl.jobToBeExecuted(jec);
    } catch (Exception e) {
      SchedulerException se = new SchedulerException(
          "JobListener '" + jl.getName() + "' threw exception: "
              + e.getMessage(), e);
      se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
      throw se;
    }
  }
}

相关文章

微信公众号

最新文章

更多

QuartzScheduler类方法