@RestController @RequestMapping(value="/batch/executions") @ExposesResourceFor(value=JobExecutionInfoResource.class) public class BatchJobExecutionsController extends AbstractBatchJobsController
jobExecutionInfoResourceAssembler, jobInfoResourceAssembler, jobInstanceInfoResourceAssembler, jobService, progressInfoResourceAssembler, stepExecutionInfoResourceAssembler, timeZone| Constructor and Description |
|---|
BatchJobExecutionsController() |
| Modifier and Type | Method and Description |
|---|---|
Collection<JobExecutionInfoResource> |
executionsForJob(String jobName,
int startJobExecution,
int pageSize)
Return a paged collection of job executions for a given job.
|
JobExecutionInfoResource |
getJobExecutionInfo(long executionId) |
void |
launchJob(String name,
String jobParameters)
Send the request to launch Job.
|
org.springframework.hateoas.PagedResources<JobExecutionInfoResource> |
list(org.springframework.data.domain.Pageable pageable)
List all job executions in a given range.
|
void |
restartJobExecution(long jobExecutionId)
Restart the Job Execution with the given executionId.
|
void |
stopAll()
Stop all job executions.
|
void |
stopJobExecution(long jobExecutionId)
Stop Job Execution by the given executionId.
|
setTimeZone@RequestMapping(value="", method=GET, produces="application/json") @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<JobExecutionInfoResource> list(org.springframework.data.domain.Pageable pageable) throws NoSuchJobException
PageRequest(0, 20) is passed in. See PageableHandlerMethodArgumentResolver
for details.pageable - If not provided will default to page 0 and a page size of 20NoSuchJobException@RequestMapping(value="", method=GET, params="jobname", produces="application/json") @ResponseStatus(value=OK) public Collection<JobExecutionInfoResource> executionsForJob(@RequestParam(value="jobname") String jobName, @RequestParam(defaultValue="0") int startJobExecution, @RequestParam(defaultValue="20") int pageSize)
jobName - name of the jobstartJobExecution - start index for the job execution listpageSize - page size for the list@RequestMapping(value="", method=POST, params="jobname") @ResponseStatus(value=CREATED) public void launchJob(@RequestParam(value="jobname") String name, @RequestParam(required=false) String jobParameters) throws JobParametersInvalidException, JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, NoSuchJobException
name - the name of the jobjobParameters - the job parameters in comma delimited formJobParametersInvalidExceptionJobExecutionAlreadyRunningExceptionJobRestartExceptionJobInstanceAlreadyCompleteExceptionNoSuchJobException@RequestMapping(value="/{executionId}", method=GET) @ResponseStatus(value=OK) public JobExecutionInfoResource getJobExecutionInfo(@PathVariable long executionId) throws NoSuchJobExecutionException
executionId - Id of the JobExecutionNoSuchJobExecutionException - Thrown if the JobExecution does not exist@RequestMapping(value="/{executionId}", method=PUT, params="stop=true") @ResponseStatus(value=OK) public void stopJobExecution(@PathVariable(value="executionId") long jobExecutionId) throws JobExecutionNotRunningException, NoSuchJobExecutionException
jobExecutionId - the executionId of the job execution to stopJobExecutionNotRunningExceptionNoSuchJobExecutionException@RequestMapping(value="/{executionId}", method=PUT, params="restart=true") @ResponseStatus(value=OK) public void restartJobExecution(@PathVariable(value="executionId") long jobExecutionId) throws NoSuchJobExecutionException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobInstanceAlreadyCompleteException, JobRestartException, NoSuchJobException
jobExecutionId - the executionId of the job execution to restartNoSuchJobExecutionExceptionJobExecutionAlreadyRunningExceptionJobParametersInvalidExceptionJobInstanceAlreadyCompleteExceptionJobRestartExceptionNoSuchJobException@RequestMapping(value="", method=PUT, params="stop=true") @ResponseStatus(value=OK) public void stopAll()
Copyright © 2015. All rights reserved.