public class JobTemplate extends java.lang.Object implements JobOperations
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,org.springframework.hateoas.UriTemplate> |
resources
Holds discovered URLs of the API.
|
protected org.springframework.web.client.RestTemplate |
restTemplate
A template used for http interaction.
|
| Modifier and Type | Method and Description |
|---|---|
JobDefinitionResource |
createJob(java.lang.String name,
java.lang.String definition,
boolean deploy)
Create a new Job, optionally deploying it.
|
void |
deploy(java.lang.String name,
java.lang.String properties)
Deploy an already created resource.
|
void |
destroy(java.lang.String name)
Destroy an existing resource.
|
void |
destroyAll()
Undeploy all the resources known to the system.
|
JobExecutionInfoResource |
displayJobExecution(long jobExecutionId)
Retrieve a specific Job Execution for the provided
jobExecutionId. |
JobInstanceInfoResource |
displayJobInstance(long instanceId)
Retrieve a specific instance of a job, given its intanceId.
|
StepExecutionInfoResource |
displayStepExecution(long jobExecutionId,
long stepExecutionId)
|
void |
launchJob(java.lang.String name,
java.lang.String jobParameters)
Launch a job that is already deployed.
|
JobDefinitionResource.Page |
list()
List jobs known to the system.
|
JobExecutionInfoResource.Page |
listJobExecutions()
List all Job Executions.
|
java.util.List<StepExecutionInfoResource> |
listStepExecutions(long jobExecutionId)
|
void |
restartJobExecution(long executionId)
Restart a given job execution.
|
StepExecutionProgressInfoResource |
stepExecutionProgress(long jobExecutionId,
long stepExecutionId)
Retrieve step execution progress with the given
jobExecutionId and stepExecutionId. |
void |
stopAllJobExecutions()
Stop all job executions.
|
void |
stopJobExecution(long executionId)
Stop job execution that is running.
|
java.lang.String |
toString() |
void |
undeploy(java.lang.String name)
Undeploy a deployed resource, retaining its definition.
|
void |
undeployAll()
Undeploy all the resources known to the system.
|
protected org.springframework.web.client.RestTemplate restTemplate
protected java.util.Map<java.lang.String,org.springframework.hateoas.UriTemplate> resources
public JobDefinitionResource createJob(java.lang.String name, java.lang.String definition, boolean deploy)
JobOperationscreateJob in interface JobOperationspublic void destroy(java.lang.String name)
ResourceOperationsdestroy in interface ResourceOperationspublic void deploy(java.lang.String name,
java.lang.String properties)
ResourceOperationsdeploy in interface ResourceOperationspublic void launchJob(java.lang.String name,
java.lang.String jobParameters)
JobOperationslaunchJob in interface JobOperationsname - the name of the job to launchjobParameters - the JSON string as jobParameterspublic void stopAllJobExecutions()
JobOperationsstopAllJobExecutions in interface JobOperationspublic void stopJobExecution(long executionId)
JobOperationsstopJobExecution in interface JobOperationspublic void restartJobExecution(long executionId)
JobOperationsrestartJobExecution in interface JobOperationspublic void undeploy(java.lang.String name)
ResourceOperationsundeploy in interface ResourceOperationspublic JobDefinitionResource.Page list()
JobOperationslist in interface JobOperationspublic void undeployAll()
ResourceOperationsundeployAll in interface ResourceOperationspublic void destroyAll()
ResourceOperationsdestroyAll in interface ResourceOperationspublic java.lang.String toString()
toString in class java.lang.Objectpublic JobExecutionInfoResource.Page listJobExecutions()
JobOperationslistJobExecutions in interface JobOperationspublic JobExecutionInfoResource displayJobExecution(long jobExecutionId)
JobOperationsjobExecutionId.displayJobExecution in interface JobOperationspublic java.util.List<StepExecutionInfoResource> listStepExecutions(long jobExecutionId)
JobOperationslistStepExecutions in interface JobOperationspublic StepExecutionProgressInfoResource stepExecutionProgress(long jobExecutionId, long stepExecutionId)
JobOperationsjobExecutionId and stepExecutionId.stepExecutionProgress in interface JobOperationspublic StepExecutionInfoResource displayStepExecution(long jobExecutionId, long stepExecutionId)
JobOperationsdisplayStepExecution in interface JobOperationspublic JobInstanceInfoResource displayJobInstance(long instanceId)
JobOperationsdisplayJobInstance in interface JobOperations