| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.util.threadpool.RunnableTaskWrapper
Makes a runnable a task.
| Constructor Summary | |
| RunnableTaskWrapper(Runnable runnable)Create a new RunnableTaskWrapper | |
| RunnableTaskWrapper(Runnable runnable,
                    long startTimeout,
                    long completeTimeout) | |
| Method Summary | |
|  void | acceptTask()The task has been accepted | 
|  long | getTaskCompletionTimeout()The time before the task must be completed | 
|  int | getTaskPriority()The priority of the task | 
|  long | getTaskStartTimeout()The time before the task must be accepted | 
|  int | getTaskWaitType()Get the type of wait | 
|  boolean | isComplete()Indicate if the task has exited the Runnable#run method | 
|  void | rejectTask(RuntimeException t)The task has been rejected | 
|  void | run() | 
|  void | stopTask()Invoked by the threadpool when it wants to stop the task | 
|  void | waitForTask()Wait according the wait type | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public RunnableTaskWrapper(Runnable runnable)
runnable - the runnable
IllegalArgumentException - for a null runnablepublic RunnableTaskWrapper(Runnable runnable, long startTimeout, long completeTimeout)
| Method Detail | 
public int getTaskWaitType()
TaskWrapper
getTaskWaitType in interface TaskWrapperpublic int getTaskPriority()
TaskWrapper
getTaskPriority in interface TaskWrapperpublic long getTaskStartTimeout()
TaskWrapper
getTaskStartTimeout in interface TaskWrapperpublic long getTaskCompletionTimeout()
TaskWrapper
getTaskCompletionTimeout in interface TaskWrapperpublic void acceptTask()
TaskWrapper
acceptTask in interface TaskWrapperpublic void rejectTask(RuntimeException t)
TaskWrapper
rejectTask in interface TaskWrappert - any error associated with the rejectionpublic void stopTask()
TaskWrapper
stopTask in interface TaskWrapperpublic void waitForTask()
TaskWrapper
waitForTask in interface TaskWrapperpublic boolean isComplete()
TaskWrapper
isComplete in interface TaskWrapperpublic void run()
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||