Class TaskExecutionResource
java.lang.Object
org.springframework.hateoas.RepresentationModel<TaskExecutionResource>
org.springframework.cloud.dataflow.rest.resource.TaskExecutionResource
public class TaskExecutionResource
extends org.springframework.hateoas.RepresentationModel<TaskExecutionResource>
A HATEOAS representation of a TaskExecution.
- Author:
- Glenn Renfro, Gunnar Hillert, Ilayaperumal Gopinathan, Corneil du Plessis
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionTaskExecutionResource
(TaskJobExecutionRel taskJobExecutionRel) Constructor to initialize the TaskExecutionResource usingTaskJobExecutionRel
.TaskExecutionResource
(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskManifest taskManifest, TaskJobExecution composedTaskJobExecution) Constructor to initialize the TaskExecutionResource using aTaskExecution
andTaskManifest
.TaskExecutionResource
(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskJobExecution composedTaskJobExecution) Constructor to initialize the TaskExecutionResource using aTaskExecution
. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the calculated status of thisTaskExecution
.void
setPlatformName
(String platformName) void
setTaskExecutionStatus
(String taskExecutionStatus) Methods inherited from class org.springframework.hateoas.RepresentationModel
add, add, add, addAllIf, addIf, equals, getLink, getLink, getLinks, getLinks, getLinks, getRequiredLink, getRequiredLink, hashCode, hasLink, hasLink, hasLinks, mapLink, mapLinkIf, of, of, removeLinks, toString
-
Constructor Details
-
TaskExecutionResource
public TaskExecutionResource() -
TaskExecutionResource
Constructor to initialize the TaskExecutionResource usingTaskJobExecutionRel
.- Parameters:
taskJobExecutionRel
- contains theTaskExecution
but also a list of the Job ExecutionIds that were associated with this task if applicable.
-
TaskExecutionResource
public TaskExecutionResource(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskJobExecution composedTaskJobExecution) Constructor to initialize the TaskExecutionResource using aTaskExecution
.- Parameters:
taskExecution
- contains theTaskExecution
composedTaskJobExecution
- the optional composed task execution.
-
TaskExecutionResource
public TaskExecutionResource(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskManifest taskManifest, TaskJobExecution composedTaskJobExecution) Constructor to initialize the TaskExecutionResource using aTaskExecution
andTaskManifest
.- Parameters:
taskExecution
- contains theTaskExecution
taskManifest
- contains the (@link TaskManifest}composedTaskJobExecution
- The optional composed task execution.
-
-
Method Details
-
getExecutionId
public long getExecutionId() -
getExitCode
- Returns:
- the int containing the exit code of the task application upon completion. Default is 0.
-
getTaskName
-
getStartTime
-
getEndTime
-
getExitMessage
-
getArguments
-
getJobExecutionIds
-
getErrorMessage
-
getExternalExecutionId
-
getParentExecutionId
-
getResourceUrl
-
getAppProperties
-
getDeploymentProperties
-
getPlatformName
-
setPlatformName
-
setTaskExecutionStatus
-
getTaskExecutionStatus
Returns the calculated status of thisTaskExecution
. IfstartTime
is null, theTaskExecution
is considered to be not running (never executed). IfendTime
is null, theTaskExecution
is considered to be still running:TaskExecutionStatus.RUNNING
. If theendTime
is defined and theexitCode
is non-zero, an status ofTaskExecutionStatus.ERROR
is assumed, ifexitCode
is zero,TaskExecutionStatus.COMPLETE
is returned.- Returns:
- TaskExecutionStatus, never null
-