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 Details

    • JobInstanceController

      public JobInstanceController(TaskJobService taskJobService)
      Creates a JobInstanceController that retrieves Job Instance information.
      Parameters:
      taskJobService - the TaskJobService 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 of JobInstanceResource defined jobs.
      Parameters:
      jobName - the name of the job
      pageable - page-able collection of JobInstances.
      assembler - for the JobInstances
      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 requested JobInstance
      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.