|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskDescriptor<V>
TaskDescriptor decribes the state of a long running task.
Method Summary | |
---|---|
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. |
com.atlassian.crowd.embedded.api.User |
getUser()
Return the user that started to task. |
boolean |
isFinished()
Tells if caller if the task has finished running or not. |
boolean |
isStarted()
True if the task has been started. |
Method Detail |
---|
V getResult() throws ExecutionException, InterruptedException
ExecutionException
- if an uncaught exception is thrown from the task's callable.
InterruptedException
- if the calling thread is interrupted while waiting for the result.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()
com.atlassian.crowd.embedded.api.User getUser()
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |