public class ExecutionContext extends Object
Constructor and Description |
---|
ExecutionContext(ExecutionConfigView parameters,
Map<String,TaskBase> availableTasks)
Initializes the context, task list and execution status maintaining infrastructure
|
Modifier and Type | Method and Description |
---|---|
TaskResultView |
getCurrentTaskProgress()
Returns the
TaskResultView for the latest run task |
Status |
getOverallStatus()
Returns the overall status of the task execution session.
|
(package private) ExecutionConfigView |
getParameters() |
long |
getStartTime()
Gives the start time of this execution context
|
String |
getTargetFilePath()
Returns the actual pathname where the final output file of this session will be created, falling back to system
temp dir if not specified by invoker
|
ExecutionSummaryView |
getTaskExecutionSummary()
Returns the status report of this execution session
|
(package private) Map<TaskBase,Map<String,String>> |
getTasks() |
(package private) void |
markStartExecution()
Marks execution starting point of overall session
|
(package private) void |
setOverallStatus(Status status) |
void |
setTargetFilePath(String filePath)
Updates the pathname where the final output file of this session will be created
|
(package private) void |
updateStatus(String taskId,
long timestamp,
Status status)
Sets the latest status of a task, and updates the status report
|
(package private) void |
updateStatus(String taskId,
long timestamp,
Status status,
String extraInfo)
Sets the latest status of a task, and updates the status report
|
public ExecutionContext(ExecutionConfigView parameters, Map<String,TaskBase> availableTasks)
parameters
- invocation parameters for this sessionavailableTasks
- Map of all TaskBase
s available on the UltraESB instanceExecutionConfigView getParameters()
public String getTargetFilePath()
public void setTargetFilePath(String filePath)
filePath
- new file pathnamepublic long getStartTime()
public TaskResultView getCurrentTaskProgress()
TaskResultView
for the latest run taskTaskResultView
for the latest run taskpublic Status getOverallStatus()
Status
indicating overall status of the sessionvoid setOverallStatus(Status status)
public ExecutionSummaryView getTaskExecutionSummary()
ExecutionSummaryView
of this execution sessionvoid markStartExecution()
void updateStatus(String taskId, long timestamp, Status status)
taskId
- ID of the task whose status is to be settimestamp
- status update timestampstatus
- current status of taskvoid updateStatus(String taskId, long timestamp, Status status, String extraInfo)
taskId
- ID of the task whose status is to be settimestamp
- status update timestampstatus
- current status of the taskextraInfo
- additional details regarding task (e.g. reason for failure)Copyright © 2016–2019 AdroitLogic. All rights reserved.