org.springframework.batch.core.configuration.support

## Interface JobLoader

- All Known Implementing Classes:
    DefaultJobLoader

      public interface JobLoader

  Since:
    2.1
  Author:
    Dave Syer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.

- - ### Method Detail

    - #### load

          java.util.Collection<Job> load(ApplicationContextFactory factory)
                                  throws DuplicateJobException

      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

          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).
      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.