public class StepRunner
extends java.lang.Object
Job
. This is useful in
end to end testing in order to allow for the testing of a step individually
without running every Step in a job.
SimpleJob
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger
|
Constructor and Description |
---|
StepRunner(JobLauncher launcher,
JobRepository jobRepository) |
Modifier and Type | Method and Description |
---|---|
JobExecution |
launchStep(Step step)
Launch just the specified step as its own job.
|
JobExecution |
launchStep(Step step,
ExecutionContext jobExecutionContext)
Launch just the specified step as its own job.
|
JobExecution |
launchStep(Step step,
JobParameters jobParameters)
Launch just the specified step as its own job.
|
JobExecution |
launchStep(Step step,
JobParameters jobParameters,
ExecutionContext jobExecutionContext)
Launch just the specified step as its own job.
|
public StepRunner(JobLauncher launcher, JobRepository jobRepository)
public JobExecution launchStep(Step step)
step
- The step to launchpublic JobExecution launchStep(Step step, @Nullable ExecutionContext jobExecutionContext)
step
- The step to launchjobExecutionContext
- An ExecutionContext whose values will be
loaded into the Job ExecutionContext prior to launching the step.public JobExecution launchStep(Step step, JobParameters jobParameters)
step
- The step to launchjobParameters
- The JobParameters to use during the launchpublic JobExecution launchStep(Step step, JobParameters jobParameters, @Nullable ExecutionContext jobExecutionContext)
step
- The step to launchjobParameters
- The JobParameters to use during the launchjobExecutionContext
- An ExecutionContext whose values will be
loaded into the Job ExecutionContext prior to launching the step.