Java 类org.quartz.simpl.SimpleJobFactory 实例源码

项目:nexus-public    文件:SchedulerTest.java   
protected Scheduler createScheduler(String name, int threadPoolSize) throws SchedulerException {
  try {
    this.taskSchedulerHelper = new TaskSchedulerHelper(database.getInstance());
    this.taskSchedulerHelper.init(threadPoolSize, new SimpleJobFactory());
    this.taskSchedulerHelper.start();
    return ((QuartzSchedulerSPI) taskSchedulerHelper.getScheduler()).getScheduler();
  }
  catch (Exception e) {
    Throwables.throwIfUnchecked(e);
    throw new RuntimeException(e);
  }
}
项目:cloudbreak    文件:AppConfig.java   
@Bean
public SchedulerFactoryBean schedulerFactoryBean() {
    SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
    scheduler.setTaskExecutor(getAsyncExecutor());
    scheduler.setAutoStartup(true);
    scheduler.setJobFactory(new SimpleJobFactory());
    return scheduler;
}