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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTaskExecutionResource(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 aTaskExecutionandTaskManifest.TaskExecutionResource(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskJobExecution composedTaskJobExecution) Constructor to initialize the TaskExecutionResource using aTaskExecution. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the calculated status of thisTaskExecution.voidsetPlatformName(String platformName) voidsetTaskExecutionStatus(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 theTaskExecutionbut 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 theTaskExecutioncomposedTaskJobExecution- 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 aTaskExecutionandTaskManifest.- Parameters:
taskExecution- contains theTaskExecutiontaskManifest- 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. IfstartTimeis null, theTaskExecutionis considered to be not running (never executed). IfendTimeis null, theTaskExecutionis considered to be still running:TaskExecutionStatus.RUNNING. If theendTimeis defined and theexitCodeis non-zero, an status ofTaskExecutionStatus.ERRORis assumed, ifexitCodeis zero,TaskExecutionStatus.COMPLETEis returned.- Returns:
- TaskExecutionStatus, never null
-