Package org.springframework.batch.core.configuration.support

# Interface JobLoader

All Known Implementing Classes:
  `DefaultJobLoader`

public interface JobLoader

Since:
  2.1
Author:
  Dave Syer

- ## Method Summary

  Modifier and Type
  Method
  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.

- ## Method Details

  - ### load

    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

    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.