Interface TaskStatus
-
public interface TaskStatus
Created by colby.clegg on 3/30/2015.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getCurrentCompletionPercent()
Returns a value, 0-100.0java.lang.String
getCurrentMessage()
Returns a message that will be displayed for the current state.java.lang.Long
getId()
Returns an ID that refers to a single task.java.lang.String
getName()
Returns the user defined name of the taskjava.util.Optional<TaskState>
getPreviousState()
Indicates the state of a task before it got suspended.java.util.Date
getStartTime()
Returns the time that the task started, if it is currently running (or was running), or the next time the task will run.TaskState
getState()
Indicates the current state of the task, and to some degree, indicates how getStartTime() should be interpreted.TaskType
getTaskType()
boolean
isOneShot()
If true, this indicates that the task will be run exactly once.
-
-
-
Method Detail
-
getId
java.lang.Long getId()
Returns an ID that refers to a single task. The task type might be defined multiple times, and a task with this id might run multiple times, but there will never be more than one instance of it running at a time.
-
getTaskType
TaskType getTaskType()
-
getState
TaskState getState()
Indicates the current state of the task, and to some degree, indicates how getStartTime() should be interpreted. If the state is not Running, but start time is in the past, then it is a one-shot task that has finished.
-
getPreviousState
java.util.Optional<TaskState> getPreviousState()
Indicates the state of a task before it got suspended. If this state was set, it will likely be Running, Waiting, or Scheduled.
-
getName
java.lang.String getName()
Returns the user defined name of the task
-
getCurrentMessage
java.lang.String getCurrentMessage()
Returns a message that will be displayed for the current state.
-
getCurrentCompletionPercent
double getCurrentCompletionPercent()
Returns a value, 0-100.0
-
getStartTime
java.util.Date getStartTime()
Returns the time that the task started, if it is currently running (or was running), or the next time the task will run.
-
isOneShot
boolean isOneShot()
If true, this indicates that the task will be run exactly once. Scheduled recurring tasks will return false.
-
-