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

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

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

QuartzScheduler.getJobFactory介绍

暂无

代码示例

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

public void initialize(QuartzScheduler sched)
  throws SchedulerException {
  this.qs = sched;
  Job job = null;
  JobDetail jobDetail = firedTriggerBundle.getJobDetail();
  try {
    job = sched.getJobFactory().newJob(firedTriggerBundle, scheduler);
  } catch (SchedulerException se) {
    sched.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getKey() + "'", se);
    throw se;
  } catch (Throwable ncdfe) { // such as NoClassDefFoundError
    SchedulerException se = new SchedulerException(
        "Problem instantiating class '"
            + jobDetail.getJobClass().getName() + "' - ", ncdfe);
    sched.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getKey() + "'", se);
    throw se;
  }
  this.jec = new JobExecutionContextImpl(scheduler, firedTriggerBundle, job);
}

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

public void initialize(QuartzScheduler sched)
  throws SchedulerException {
  this.qs = sched;
  Job job = null;
  JobDetail jobDetail = firedTriggerBundle.getJobDetail();
  try {
    job = sched.getJobFactory().newJob(firedTriggerBundle, scheduler);
  } catch (SchedulerException se) {
    sched.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getKey() + "'", se);
    throw se;
  } catch (Throwable ncdfe) { // such as NoClassDefFoundError
    SchedulerException se = new SchedulerException(
        "Problem instantiating class '"
            + jobDetail.getJobClass().getName() + "' - ", ncdfe);
    sched.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getKey() + "'", se);
    throw se;
  }
  this.jec = new JobExecutionContextImpl(scheduler, firedTriggerBundle, job);
}

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

public void initialize(QuartzScheduler qs, TriggerFiredBundle firedBundle)
  throws SchedulerException {
  this.qs = qs;
  Job job = null;
  JobDetail jobDetail = firedBundle.getJobDetail();
  try {
    job = qs.getJobFactory().newJob(firedBundle);
  } catch (SchedulerException se) {
    qs.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getFullName() + "'", se);
    throw se;
  } catch (Throwable ncdfe) { // such as NoClassDefFoundError
    SchedulerException se = new SchedulerException(
        "Problem instantiating class '"
            + jobDetail.getJobClass().getName() + "' - ", ncdfe);
    qs.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getFullName() + "'", se);
    throw se;
  }
  this.jec = new JobExecutionContext(scheduler, firedBundle, job);
}

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

public void initialize(QuartzScheduler qs, TriggerFiredBundle firedBundle)
  throws SchedulerException {
  this.qs = qs;
  Job job = null;
  JobDetail jobDetail = firedBundle.getJobDetail();
  try {
    job = qs.getJobFactory().newJob(firedBundle);
  } catch (SchedulerException se) {
    qs.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getFullName() + "'", se);
    throw se;
  } catch (Throwable ncdfe) { // such as NoClassDefFoundError
    SchedulerException se = new SchedulerException(
        "Problem instantiating class '"
            + jobDetail.getJobClass().getName() + "' - ", ncdfe);
    qs.notifySchedulerListenersError(
        "An error occured instantiating job to be executed. job= '"
            + jobDetail.getFullName() + "'", se);
    throw se;
  }
  this.jec = new JobExecutionContext(scheduler, firedBundle, job);
}

相关文章

微信公众号

最新文章

更多

QuartzScheduler类方法