org.springframework.batch.core.launch
Interface JobLauncher

All Known Implementing Classes:
SimpleJobLauncher

public interface JobLauncher

Simple interface for controlling jobs, including possible ad-hoc executions, based on different runtime identifiers. It is extremely important to note that this interface makes absolutely no guarantees about whether or not calls to it are executed synchronously or asynchronously. The javadocs for specific implementations should be checked to ensure callers fully understand how the job will be run.

Author:
Lucas Ward, Dave Syer

Method Summary
 JobExecution run(Job job, JobParameters jobParameters)
          Start a job execution for the given Job and JobParameters.
 

Method Detail

run

JobExecution run(Job job,
                 JobParameters jobParameters)
                 throws JobExecutionAlreadyRunningException,
                        JobRestartException,
                        JobInstanceAlreadyCompleteException
Start a job execution for the given Job and JobParameters.

Returns:
the exit code from the job if it returns synchronously. If the implementation is asynchronous, the status might well be unknown.
Throws:
JobExecutionAlreadyRunningException - if the JobInstance identified by the properties already has an execution running.
IllegalArgumentException - if the job or jobInstanceProperties are null.
JobRestartException - if the job has been run before and circumstances that preclude a re-start.
JobInstanceAlreadyCompleteException - if the job has been run before with the same parameters and completed successfully


Copyright © 2009 SpringSource. All Rights Reserved.