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 protected
ImportScheduler(org.quartz.Scheduler scheduler)
Constructor for ImportScheduler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
afterPropertiesSetprotected void
buildImportSchedule()
buildImportScheduleorg.quartz.spi.JobFactory
getImportJobFactory()
getImportJobFactoryprotected Provisioner
getProvisioner()
getProvisionerorg.quartz.Scheduler
getScheduler()
getSchedulervoid
pause()
pauseprotected void
rebuildImportSchedule()
Removes all jobs from the current scheduled and the builds a new schedule from the reloaded configuration.protected void
removeCurrentJobsFromSchedule()
Iterates of current job list and removes each job from the underlying schedulevoid
resume()
resumevoid
setImportJobFactory(org.quartz.spi.JobFactory importJobFactory)
setImportJobFactoryvoid
setProvisioner(Provisioner provisioner)
setProvisionervoid
standBy()
standByvoid
start()
startvoid
stop()
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 Exception
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
start
public void start() throws org.quartz.SchedulerException
start
- Throws:
org.quartz.SchedulerException
- if any.
-
pause
public void pause() throws org.quartz.SchedulerException
pause
- Throws:
org.quartz.SchedulerException
- if any.
-
standBy
public void standBy() throws org.quartz.SchedulerException
standBy
- Throws:
org.quartz.SchedulerException
- if any.
-
resume
public void resume() throws org.quartz.SchedulerException
resume
- Throws:
org.quartz.SchedulerException
- if any.
-
stop
public void stop() throws org.quartz.SchedulerException
stop
- Throws:
org.quartz.SchedulerException
- if any.
-
rebuildImportSchedule
protected void rebuildImportSchedule() throws Exception
Removes 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.SchedulerException
Iterates 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
Scheduler
object.
-
setProvisioner
public void setProvisioner(Provisioner provisioner)
setProvisioner
- Parameters:
provisioner
- aProvisioner
object.
-
getProvisioner
protected final Provisioner getProvisioner()
getProvisioner
- Returns:
- a
Provisioner
object.
-
setImportJobFactory
public void setImportJobFactory(org.quartz.spi.JobFactory importJobFactory)
setImportJobFactory
- Parameters:
importJobFactory
- aJobFactory
object.
-
getImportJobFactory
public org.quartz.spi.JobFactory getImportJobFactory()
getImportJobFactory
- Returns:
- a
JobFactory
object.
-
-