接口 JobLoader
- 所有已知实现类:
DefaultJobLoader
public interface JobLoader
- 从以下版本开始:
- 2.1
- 作者:
- Dave Syer
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
clear()
Unregister all the jobs and close all the contexts created by this loader.java.util.Collection<Job>
load(ApplicationContextFactory factory)
Load an application context and register all the jobs.java.util.Collection<Job>
reload(ApplicationContextFactory factory)
Load an application context and register all the jobs, having first unregistered them if already registered.
方法详细资料
load
java.util.Collection<Job> load(ApplicationContextFactory factory) throws DuplicateJobException
Load an application context and register all the jobs.- 参数:
factory
- a factory for an application context (containing jobs)- 返回:
- a collection of the jobs created
- 抛出:
DuplicateJobException
- if a job with the same name was already registered
reload
java.util.Collection<Job> reload(ApplicationContextFactory factory)
Load an application context and register all the jobs, having first unregistered them if already registered. Implementations should also take care to close and clean up the application context previously created if possible (either from this factory or from one with the same jobs).- 参数:
factory
- a factory for an application context (containing jobs)- 返回:
- a collection of the jobs created
clear
void clear()
Unregister all the jobs and close all the contexts created by this loader.