@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.PagedModel<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.PagedModel<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.
|
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.PagedModel<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 - in the event that a job execution id specified
is not present when looking up stepExecutions for the result.@RequestMapping(value="",
method=GET,
params="name",
produces="application/json")
@ResponseStatus(value=OK)
public org.springframework.hateoas.PagedModel<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 job. SQL server specific wildcards are enabled (eg.: myJob%, m_Job, ...)pageable - page-able collection of TaskJobExecutions.assembler - for the TaskJobExecutionsorg.springframework.batch.core.launch.NoSuchJobException - if the job with the given name does not exist.@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 - if the specified job execution for the id does
not exist.@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 stop.org.springframework.batch.core.launch.JobExecutionNotRunningException - if a stop is requested on a job that is not
running.org.springframework.batch.core.launch.NoSuchJobExecutionException - if the job execution id specified does not
exist.@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.NoSuchJobExecutionException - if the job execution for the jobExecutionId
specified does not exist.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.