public class Task
extends java.lang.Object
implements java.io.Serializable
Task class holds task information like URL to be executed and the status of execution
of the task.URLTask,
ChainedURLTask,
Serialized Form| Constructor and Description |
|---|
Task() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorMsg()
Get the error encountered during task execution.
|
java.lang.Long |
getLastTaskStatusUpdateTime()
Get the last update time when there is a change in task status.
|
LightningCoreConstants.TaskStatus |
getStatus()
Get the current execution state of the task.
|
java.lang.String |
getUrl()
Get the URL to be executed.
|
boolean |
hasFailed()
Check if the task failed.
|
void |
setErrorMsg(java.lang.String errorMsg)
Set the error encountered during task execution.
|
void |
setLastTaskStatusUpdateTime(java.lang.Long lastTaskStatusUpdateTime)
Set the last update time when there is a change in task status.
|
void |
setStatus(LightningCoreConstants.TaskStatus status)
Set the current execution state of the task.
|
void |
setUrl(java.lang.String url)
Set the URL to be executed.
|
public LightningCoreConstants.TaskStatus getStatus()
Refer LightningCoreConstants.TaskStatus on the possible states for the task.
public void setStatus(LightningCoreConstants.TaskStatus status)
Refer LightningCoreConstants.TaskStatus on the possible states for the task.
status - the current execution state of the taskpublic java.lang.String getErrorMsg()
public void setErrorMsg(java.lang.String errorMsg)
errorMsg - the error if any encountered during task executionpublic java.lang.Long getLastTaskStatusUpdateTime()
public void setLastTaskStatusUpdateTime(java.lang.Long lastTaskStatusUpdateTime)
lastTaskStatusUpdateTime - the last update time when there is a change in task statuspublic java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - the URL to be executedpublic boolean hasFailed()