Package org.springframework.batch.core
Interface Job
- All Known Implementing Classes:
- AbstractJob,- FlowJob,- GroupAwareJob,- SimpleJob
public interface Job
Batch domain object representing a job. 
Job is an explicit abstraction
 representing the configuration of a job specified by a developer. Note that the restart
 policy is applied to the job as a whole and not to a step.- Author:
- Dave Syer, Mahmoud Ben Hassine
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute(JobExecution execution) Run theJobExecutionand update the meta information, such as status and statistics, as necessary.default JobParametersIncrementerIf clients need to generate new parameters for the next execution in a sequence, they can use this incrementer.default JobParametersValidatorA validator for the job parameters of aJobExecution.getName()default booleanFlag to indicate if this job can be restarted, at least in principle.
- 
Method Details- 
getNameString getName()
- 
isRestartabledefault boolean isRestartable()Flag to indicate if this job can be restarted, at least in principle.- Returns:
- true if this job can be restarted after a failure. Defaults to
 true.
 
- 
executeRun theJobExecutionand update the meta information, such as status and statistics, as necessary. This method should not throw any exceptions for failed execution. Clients should be careful to inspect theJobExecutionstatus to determine success or failure.- Parameters:
- execution- a- JobExecution
 
- 
getJobParametersIncrementerIf clients need to generate new parameters for the next execution in a sequence, they can use this incrementer. The return value may benull, when this job does not have a natural sequence.- Returns:
- an incrementer to be used for creating new parameters. Defaults to
 null.
 
- 
getJobParametersValidatorA validator for the job parameters of aJobExecution. Clients of aJobmay need to validate the parameters for a launch or before or during the execution.- Returns:
- a validator that can be used to check parameter values (never
 null). Defaults toDefaultJobParametersValidator.
 
 
-