public class RunnableTaskWrapper extends Object implements TaskWrapper
| Constructor and Description |
|---|
RunnableTaskWrapper(Runnable runnable)
Create a new RunnableTaskWrapper
|
RunnableTaskWrapper(Runnable runnable,
long startTimeout,
long completeTimeout) |
| Modifier and Type | Method and Description |
|---|---|
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()
Is the task complete.
|
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
|
public RunnableTaskWrapper(Runnable runnable)
runnable - the runnableIllegalArgumentException - for a null runnablepublic RunnableTaskWrapper(Runnable runnable, long startTimeout, long completeTimeout)
public int getTaskWaitType()
TaskWrappergetTaskWaitType in interface TaskWrapperpublic int getTaskPriority()
TaskWrappergetTaskPriority in interface TaskWrapperpublic long getTaskStartTimeout()
TaskWrappergetTaskStartTimeout in interface TaskWrapperpublic long getTaskCompletionTimeout()
TaskWrappergetTaskCompletionTimeout in interface TaskWrapperpublic void acceptTask()
TaskWrapperacceptTask in interface TaskWrapperpublic void rejectTask(RuntimeException t)
TaskWrapperrejectTask in interface TaskWrappert - any error associated with the rejectionpublic void stopTask()
TaskWrapperstopTask in interface TaskWrapperpublic void waitForTask()
TaskWrapperwaitForTask in interface TaskWrapperpublic boolean isComplete()
TaskWrapperisComplete in interface TaskWrapperCopyright © 2015 JBoss by Red Hat. All rights reserved.