public class DefaultJobLoader extends Object implements JobLoader
JobLoader. Uses a JobRegistry to
manage a population of loaded jobs and clears them up when asked.| Constructor and Description |
|---|
DefaultJobLoader()
Default constructor useful for declarative configuration.
|
DefaultJobLoader(JobRegistry jobRegistry)
Create a job loader with the job registry provided.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Unregister all the jobs and close all the contexts created by this
loader.
|
Collection<Job> |
load(ApplicationContextFactory factory)
Load an application context and register all the jobs.
|
Collection<Job> |
reload(ApplicationContextFactory factory)
Load an application context and register all the jobs, having first
unregistered them if already registered.
|
void |
setJobRegistry(JobRegistry jobRegistry)
The
JobRegistry to use for jobs created. |
public DefaultJobLoader()
public DefaultJobLoader(JobRegistry jobRegistry)
jobRegistry - a JobRegistrypublic void setJobRegistry(JobRegistry jobRegistry)
JobRegistry to use for jobs created.jobRegistry - public void clear()
clear in interface JobLoaderJobLoader.clear()public Collection<Job> reload(ApplicationContextFactory factory)
JobLoaderpublic Collection<Job> load(ApplicationContextFactory factory) throws DuplicateJobException
JobLoaderload in interface JobLoaderfactory - a factory for an application context (containing jobs)DuplicateJobException - if a job with the same name was already
registeredCopyright © 2014 SpringSource. All rights reserved.