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 |
---|---|
void |
cleanBusResources(java.lang.String name)
Remove any bus resources that cannot be automatically removed during undeploy.
|
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.util.Map<java.lang.String,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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cleanBusResources, deploy, destroy, destroyAll, undeploy, undeployAll
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)
JobOperations
createJob
in interface JobOperations
public void launchJob(java.lang.String name, java.lang.String jobParameters)
JobOperations
launchJob
in interface JobOperations
name
- the name of the job to launchjobParameters
- the JSON string as jobParameterspublic void stopAllJobExecutions()
JobOperations
stopAllJobExecutions
in interface JobOperations
public void stopJobExecution(long executionId)
JobOperations
stopJobExecution
in interface JobOperations
public void restartJobExecution(long executionId)
JobOperations
restartJobExecution
in interface JobOperations
public JobDefinitionResource.Page list()
JobOperations
list
in interface JobOperations
public java.lang.String toString()
toString
in class java.lang.Object
public JobExecutionInfoResource.Page listJobExecutions()
JobOperations
listJobExecutions
in interface JobOperations
public JobExecutionInfoResource displayJobExecution(long jobExecutionId)
JobOperations
jobExecutionId
.displayJobExecution
in interface JobOperations
public java.util.List<StepExecutionInfoResource> listStepExecutions(long jobExecutionId)
JobOperations
listStepExecutions
in interface JobOperations
public StepExecutionProgressInfoResource stepExecutionProgress(long jobExecutionId, long stepExecutionId)
JobOperations
jobExecutionId
and stepExecutionId
.stepExecutionProgress
in interface JobOperations
public StepExecutionInfoResource displayStepExecution(long jobExecutionId, long stepExecutionId)
JobOperations
displayStepExecution
in interface JobOperations
public JobInstanceInfoResource displayJobInstance(long instanceId)
JobOperations
displayJobInstance
in interface JobOperations
public void destroy(java.lang.String name)
ResourceOperations
destroy
in interface ResourceOperations
public void deploy(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
ResourceOperations
deploy
in interface ResourceOperations
public void undeploy(java.lang.String name)
ResourceOperations
undeploy
in interface ResourceOperations
public void undeployAll()
ResourceOperations
undeployAll
in interface ResourceOperations
public void destroyAll()
ResourceOperations
destroyAll
in interface ResourceOperations
public void cleanBusResources(java.lang.String name)
ResourceOperations
cleanBusResources
in interface ResourceOperations