Class ImportScheduler
- java.lang.Object
-
- org.opennms.netmgt.provision.service.ImportScheduler
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class ImportScheduler extends Object implements org.springframework.beans.factory.InitializingBean
Maintains the Provisioner's import schedule defined in provisiond-configuration.xml- Version:
- $Id: $
- Author:
- David Hustace
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedImportScheduler(org.quartz.Scheduler scheduler)Constructor for ImportScheduler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()afterPropertiesSetprotected voidbuildImportSchedule()buildImportScheduleorg.quartz.spi.JobFactorygetImportJobFactory()getImportJobFactoryprotected ProvisionergetProvisioner()getProvisionerorg.quartz.SchedulergetScheduler()getSchedulervoidpause()pauseprotected voidrebuildImportSchedule()Removes all jobs from the current scheduled and the builds a new schedule from the reloaded configuration.protected voidremoveCurrentJobsFromSchedule()Iterates of current job list and removes each job from the underlying schedulevoidresume()resumevoidsetImportJobFactory(org.quartz.spi.JobFactory importJobFactory)setImportJobFactoryvoidsetProvisioner(Provisioner provisioner)setProvisionervoidstandBy()standByvoidstart()startvoidstop()stop
-
-
-
Field Detail
-
JOB_GROUP
protected static final String JOB_GROUP
ConstantJOB_GROUP="Provisiond"- See Also:
- Constant Field Values
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws ExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
start
public void start() throws org.quartz.SchedulerExceptionstart
- Throws:
org.quartz.SchedulerException- if any.
-
pause
public void pause() throws org.quartz.SchedulerExceptionpause
- Throws:
org.quartz.SchedulerException- if any.
-
standBy
public void standBy() throws org.quartz.SchedulerExceptionstandBy
- Throws:
org.quartz.SchedulerException- if any.
-
resume
public void resume() throws org.quartz.SchedulerExceptionresume
- Throws:
org.quartz.SchedulerException- if any.
-
stop
public void stop() throws org.quartz.SchedulerExceptionstop
- Throws:
org.quartz.SchedulerException- if any.
-
rebuildImportSchedule
protected void rebuildImportSchedule() throws ExceptionRemoves all jobs from the current scheduled and the builds a new schedule from the reloaded configuration. Since all jobs are Cron like, removing and re-adding shouldn't be an issue.- Throws:
Exception- if any.
-
removeCurrentJobsFromSchedule
protected void removeCurrentJobsFromSchedule() throws org.quartz.SchedulerExceptionIterates of current job list and removes each job from the underlying schedule- Throws:
org.quartz.SchedulerException- if any.
-
buildImportSchedule
protected void buildImportSchedule()
buildImportSchedule
-
getScheduler
public org.quartz.Scheduler getScheduler()
getScheduler
- Returns:
- a
Schedulerobject.
-
setProvisioner
public void setProvisioner(Provisioner provisioner)
setProvisioner
- Parameters:
provisioner- aProvisionerobject.
-
getProvisioner
protected final Provisioner getProvisioner()
getProvisioner
- Returns:
- a
Provisionerobject.
-
setImportJobFactory
public void setImportJobFactory(org.quartz.spi.JobFactory importJobFactory)
setImportJobFactory
- Parameters:
importJobFactory- aJobFactoryobject.
-
getImportJobFactory
public org.quartz.spi.JobFactory getImportJobFactory()
getImportJobFactory
- Returns:
- a
JobFactoryobject.
-
-