V
- the result type.public interface TaskDescriptor<V extends Serializable> extends Serializable
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Return the description of the task passed when it was created.
|
long |
getElapsedRunTime()
This returns number of milliseconds the task has been running for.
|
Date |
getFinishedTimestamp()
Return the date when the task was finished.
|
String |
getProgressURL()
Returns the URL that displays progress on this task.
|
V |
getResult()
This returns the result of the long running task.
|
Date |
getStartedTimestamp()
Return the date when the task was started.
|
Date |
getSubmittedTimestamp()
Return the date when the task was submitted.
|
TaskContext |
getTaskContext()
Return he context of task.
|
Long |
getTaskId()
Reuturn the identifier for this task.
|
TaskProgressIndicator |
getTaskProgressIndicator()
Return the
TaskProgressIndicator associated with the task. |
String |
getUserName()
Return the user that started to task.
|
boolean |
isCancellable()
Returns whether this supports requests to cancel it.
|
boolean |
isCancelled()
Returns whether cancellation of task has been requested.
|
boolean |
isFinished()
Tells if caller if the task has finished running or not.
|
boolean |
isStarted()
True if the task has been started.
|
void |
setCancelled(boolean cancelled)
Set flag to indicate this task has been cancelled;
|
void |
setResult(V result)
Store the result in the descriptor.
|
V getResult()
boolean isStarted()
boolean isFinished()
Long getTaskId()
Date getStartedTimestamp()
null
will be returned if the task has not started executing.Date getFinishedTimestamp()
null
will be returned if the task has not finished
executing.Date getSubmittedTimestamp()
TaskManager
. A null
value will never be returned as the task will always have a submission time.long getElapsedRunTime()
String getUserName()
String getDescription()
TaskContext getTaskContext()
null
as a task must always
have a context.String getProgressURL()
TaskContext
.null
cannot be returned.TaskProgressIndicator getTaskProgressIndicator()
TaskProgressIndicator
associated with the task. A task will only have an indictator if its
callable implements the ProvidesTaskProgress
interface.TaskProgressIndicator
associated with the task or null
if there isn't one.boolean isCancellable()
true
if cancellation is supported,
and false
otherwiseboolean isCancelled()
true
if cancellation has been requested,
and false
otherwisevoid setCancelled(boolean cancelled)
cancelled
- Cancelled flagvoid setResult(V result)
result
- The ResultCopyright © 2002-2015 Atlassian. All Rights Reserved.