Class JobInstanceController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.JobInstanceController
@RestController
@RequestMapping("/jobs/instances")
@ExposesResourceFor(JobInstanceResource.class)
public class JobInstanceController
extends Object
Controller for operations on
JobInstance
. This includes obtaining Job Instance
information from the job service.- Author:
- Glenn Renfro, Gunnar Hillert
-
Constructor Summary
ConstructorDescriptionJobInstanceController
(TaskJobService taskJobService) Creates aJobInstanceController
that retrieves Job Instance information. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.PagedModel<JobInstanceResource>
list
(String jobName, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<JobInstanceExecutions> assembler) Return a page-able list ofJobInstanceResource
defined jobs.view
(long id) View the details of a single task instance, specified by id.
-
Constructor Details
-
JobInstanceController
Creates aJobInstanceController
that retrieves Job Instance information.- Parameters:
taskJobService
- theTaskJobService
used for retrieving batch instance data.
-
-
Method Details
-
list
@GetMapping(value="", params="name") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobInstanceResource> list(@RequestParam("name") String jobName, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<JobInstanceExecutions> assembler) throws org.springframework.batch.core.launch.NoSuchJobException Return a page-able list ofJobInstanceResource
defined jobs.- Parameters:
jobName
- the name of the jobpageable
- page-able collection ofJobInstance
s.assembler
- for theJobInstance
s- Returns:
- a list of Job Instance
- Throws:
org.springframework.batch.core.launch.NoSuchJobException
- if the job for jobName specified does not exist.
-
view
@GetMapping("/{id}") @ResponseStatus(OK) public JobInstanceResource view(@PathVariable long id) throws org.springframework.batch.core.launch.NoSuchJobInstanceException, org.springframework.batch.core.launch.NoSuchJobException View the details of a single task instance, specified by id.- Parameters:
id
- the id of the requestedJobInstance
- Returns:
- the
JobInstance
- Throws:
org.springframework.batch.core.launch.NoSuchJobInstanceException
- if job instance for the id does not exist.org.springframework.batch.core.launch.NoSuchJobException
- if the job for the job instance does not exist.
-