org.springframework.batch.core.launch.support
Class StubJobLauncher
java.lang.Object
org.springframework.batch.core.launch.support.StubJobLauncher
- All Implemented Interfaces:
- JobLauncher
public class StubJobLauncher
- extends Object
- implements JobLauncher
Mock Job Launcher. Normally, something like EasyMock would
be used to mock an interface, however, because of the nature
of launching a batch job from the command line, the mocked
class cannot be injected.
- Author:
- Lucas Ward
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RUN_NO_ARGS
public static final int RUN_NO_ARGS
- See Also:
- Constant Field Values
RUN_JOB_NAME
public static final int RUN_JOB_NAME
- See Also:
- Constant Field Values
RUN_JOB_IDENTIFIER
public static final int RUN_JOB_IDENTIFIER
- See Also:
- Constant Field Values
StubJobLauncher
public StubJobLauncher()
isRunning
public boolean isRunning()
run
public JobExecution run(Job job,
JobParameters jobParameters)
throws JobExecutionAlreadyRunningException
- Specified by:
run
in interface JobLauncher
- Throws:
JobExecutionAlreadyRunningException
stop
public void stop()
setReturnValue
public void setReturnValue(JobExecution returnValue)
setIsRunning
public void setIsRunning(boolean isRunning)
getLastRunCalled
public int getLastRunCalled()
Copyright © 2008 SpringSource. All Rights Reserved.