Class QuartzConfig

java.lang.Object
org.qubership.atp.tdm.configuration.QuartzConfig

@Configuration public class QuartzConfig extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    QuartzConfig(Properties props, org.springframework.context.ApplicationContext applicationContext)
    Builds Quartz config object to interact with a scheduler.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.quartz.spi.JobFactory
    Returns a JobFactory based on applicationContext.
    org.quartz.Scheduler
    scheduler(org.springframework.scheduling.quartz.SchedulerFactoryBean schedulerFactoryBean)
    Returns a scheduler based on properties from quartz.properties file.
    org.springframework.scheduling.quartz.SchedulerFactoryBean
    schedulerFactoryBean(DataSource dataSource, org.quartz.spi.JobFactory jobFactory)
    Returns a SchedulerFactoryBean based on JobFactory and DataSource.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuartzConfig

      @Autowired public QuartzConfig(@Qualifier("application.properties") Properties props, org.springframework.context.ApplicationContext applicationContext)
      Builds Quartz config object to interact with a scheduler.
  • Method Details

    • jobFactory

      @Bean public org.quartz.spi.JobFactory jobFactory()
      Returns a JobFactory based on applicationContext.
      Returns:
      A JobFactory instance
    • scheduler

      @Nullable @Bean public org.quartz.Scheduler scheduler(org.springframework.scheduling.quartz.SchedulerFactoryBean schedulerFactoryBean)
      Returns a scheduler based on properties from quartz.properties file.
      Returns:
      A scheduler instance or null if scheduler has been turned off
    • schedulerFactoryBean

      @Bean public org.springframework.scheduling.quartz.SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource, org.quartz.spi.JobFactory jobFactory) throws IOException
      Returns a SchedulerFactoryBean based on JobFactory and DataSource.
      Returns:
      A SchedulerFactoryBean instance
      Throws:
      IOException