@Controller @RequestMapping(value="/batch/executions") @ExposesResourceFor(value=JobExecutionInfoResource.class) public class BatchJobExecutionsController extends java.lang.Object
Constructor and Description |
---|
BatchJobExecutionsController(org.springframework.batch.admin.service.JobService jobService) |
Modifier and Type | Method and Description |
---|---|
JobExecutionInfoResource |
getJobExecutionInfo(java.lang.Long jobExecutionId) |
java.util.Collection<JobExecutionInfoResource> |
list(int startJobExecution,
int pageSize)
List all job executions in a given range.
|
void |
setTimeZone(java.util.TimeZone timeZone) |
void |
stopAll()
Stop all job executions.
|
void |
stopJobExecution(java.lang.Long jobExecutionId)
Stop Job Execution by the given executionId.
|
@Autowired public BatchJobExecutionsController(org.springframework.batch.admin.service.JobService jobService)
@Autowired(required=false) @Qualifier(value="userTimeZone") public void setTimeZone(java.util.TimeZone timeZone)
timeZone
- the timeZone to set@RequestMapping(value="", method=GET) @ResponseStatus(value=OK) @ResponseBody public java.util.Collection<JobExecutionInfoResource> list(@RequestParam(defaultValue="0") int startJobExecution, @RequestParam(defaultValue="20") int pageSize)
startJobExecution
- index of the first job execution to getpageSize
- how many executions to return@RequestMapping(value="/{jobExecutionId}", method=GET) @ResponseStatus(value=OK) @ResponseBody public JobExecutionInfoResource getJobExecutionInfo(@PathVariable java.lang.Long jobExecutionId)
jobExecutionId
- Id of the JobExecution
NoSuchJobExecutionException
- Thrown if the JobExecution
does not exist@RequestMapping(value="/{executionId}", method=PUT, params="stop=true") @ResponseStatus(value=OK) public void stopJobExecution(@PathVariable(value="executionId") java.lang.Long jobExecutionId)
jobExecutionId
- the executionId of the job execution to stop@RequestMapping(value="", method=PUT, params="stop=true") @ResponseStatus(value=OK) public void stopAll()