|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 TaskWrapper
public int getTaskPriority()
TaskWrapper
getTaskPriority
in interface TaskWrapper
public long getTaskStartTimeout()
TaskWrapper
getTaskStartTimeout
in interface TaskWrapper
public long getTaskCompletionTimeout()
TaskWrapper
getTaskCompletionTimeout
in interface TaskWrapper
public void acceptTask()
TaskWrapper
acceptTask
in interface TaskWrapper
public void rejectTask(RuntimeException t)
TaskWrapper
rejectTask
in interface TaskWrapper
t
- any error associated with the rejectionpublic void stopTask()
TaskWrapper
stopTask
in interface TaskWrapper
public void waitForTask()
TaskWrapper
waitForTask
in interface TaskWrapper
public boolean isComplete()
TaskWrapper
isComplete
in interface TaskWrapper
public void run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |