Interface JobLoader
- All Known Implementing Classes:
DefaultJobLoader
public interface JobLoader
- Since:
- 2.1
- Author:
- Dave Syer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Unregister all the jobs and close all the contexts created by this loader.load
(ApplicationContextFactory factory) Load an application context and register all the jobs.reload
(ApplicationContextFactory factory) Load an application context and register all the jobs, having first unregistered them if already registered.
-
Method Details
-
load
Load an application context and register all the jobs.- Parameters:
factory
- a factory for an application context (containing jobs)- Returns:
- a collection of the jobs created
- Throws:
DuplicateJobException
- if a job with the same name was already registered
-
reload
Load an application context and register all the jobs, having first unregistered them if already registered. Implementations should also close and clean up the application context previously created (either from this factory or from one with the same jobs), if possible.- Parameters:
factory
- a factory for an application context (containing jobs)- Returns:
- a collection of the jobs created
-
clear
void clear()Unregister all the jobs and close all the contexts created by this loader.
-