@RestController @RequestMapping(value="/jobs/executions") @ExposesResourceFor(value=JobExecutionResource.class) public class JobExecutionController extends Object
JobExecution.
This includes obtaining Job execution information from the job explorer.| Constructor and Description |
|---|
JobExecutionController(TaskJobService taskJobService)
Creates a
JobExecutionController that retrieves Job Execution information
from a the JobService |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.hateoas.PagedResources<JobExecutionResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler)
Return a page-able list of
JobExecutionResource defined jobs. |
void |
restartJobExecution(long jobExecutionId)
Restart the Job Execution with the given jobExecutionId.
|
org.springframework.hateoas.PagedResources<JobExecutionResource> |
retrieveJobsByName(String jobName,
org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler)
Retrieve all task job executions with the task name specified
|
void |
stopJobExecution(long jobExecutionId)
Stop a Job Execution with the given jobExecutionId.
|
JobExecutionResource |
view(long id)
View the details of a single task execution, specified by id.
|
@Autowired public JobExecutionController(TaskJobService taskJobService)
JobExecutionController that retrieves Job Execution information
from a the JobServicetaskJobService - the service this controller will use for retrieving
job execution information. Must not be null.@RequestMapping(value="", method=GET, produces="application/json") @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<JobExecutionResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
JobExecutionResource defined jobs.pageable - page-able collection of TaskJobExecutions.assembler - for the TaskJobExecutionsorg.springframework.batch.core.launch.NoSuchJobExecutionException@RequestMapping(value="", method=GET, params="name", produces="application/json") @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<JobExecutionResource> retrieveJobsByName(@RequestParam(value="name") String jobName, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException
jobName - name of the jobpageable - page-able collection of TaskJobExecutions.assembler - for the TaskJobExecutionsorg.springframework.batch.core.launch.NoSuchJobException@RequestMapping(value="/{id}", method=GET, produces="application/json") @ResponseStatus(value=OK) public JobExecutionResource view(@PathVariable(value="id") long id) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
id - the id of the requested JobExecutionJobExecutionorg.springframework.batch.core.launch.NoSuchJobExecutionException@RequestMapping(value="/{executionId}", method=PUT, params="stop=true") @ResponseStatus(value=OK) public void stopJobExecution(@PathVariable(value="executionId") long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.JobExecutionNotRunningException
stop=true in order to invoke
this endpoint.jobExecutionId - the executionId of the job execution to stoporg.springframework.batch.core.launch.JobExecutionNotRunningExceptionorg.springframework.batch.core.launch.NoSuchJobExecutionException@RequestMapping(value="/{executionId}", method=PUT, params="restart=true") @ResponseStatus(value=OK) public void restartJobExecution(@PathVariable(value="executionId") long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
restart=true in order
to invoke this endpoint.jobExecutionId - the executionId of the job execution to restartorg.springframework.batch.core.launch.NoSuchJobExecutionExceptionCopyright © 2016 Pivotal Software, Inc.. All rights reserved.