| org.sape.carbon.services.threadpool.TaskInfo
All known Subclasses: org.sape.carbon.services.threadpool.TaskInfoImpl,
TaskInfo | public interface TaskInfo (Code) | | An object that implements this interface is returned by the ThreadPool
execute methods. This object can be used to get information about the status
of the task and why it failed. It can also be used to wait until the task
completes.
Copyright 2002 Sapient
since: carbon 1.2 author: Douglas Voet, Nov 5, 2002 version: $Revision: 1.5 $($Author: dvoet $ / $Date: 2003/11/20 18:49:59 $) |
getFailureCause | Throwable getFailureCause()(Code) | | Gets the cause of task failure.
the exception that caused the failure, or null if the taskdid not complete or completed successfully. |
getStatus | TaskStatusEnum getStatus()(Code) | | Gets the task's status. Note that if either the
QueueFullPolicyEnum.DISCARD or QueueFullPolicyEnum.DISCARD_OLDEST
policies are used, a task may never get out of the
TaskStatusEnum.PENDING state.
status |
getTaskName | String getTaskName()(Code) | | Gets the name of the task as it was passed in to the
ThreadPool.execute method.
name |
waitUntilExecuted | void waitUntilExecuted(long miliseconds) throws InterruptedException(Code) | | Waits a given amout of time for the task to complete. You can check
the status of the task afterward to see if it actually completed or
timed out. If the task has already completed, it returns.
Parameters: miliseconds - timout in miliseconds throws: InterruptedException - |
|
|