Package org.jboss.util.threadpool
Interface TaskWrapper
-
- All Superinterfaces:
java.lang.Runnable
- All Known Implementing Classes:
BasicTaskWrapper
,RunnableTaskWrapper
public interface TaskWrapper extends java.lang.Runnable
A task wrapper for a thread pool.- Version:
- $Revision$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acceptTask()
The task has been acceptedlong
getTaskCompletionTimeout()
The time before the task must be completedint
getTaskPriority()
The priority of the tasklong
getTaskStartTimeout()
The time before the task must be acceptedint
getTaskWaitType()
Get the type of waitboolean
isComplete()
Is the task complete.void
rejectTask(java.lang.RuntimeException e)
The task has been rejectedvoid
stopTask()
Invoked by the threadpool when it wants to stop the taskvoid
waitForTask()
Wait according the wait type
-
-
-
Method Detail
-
getTaskWaitType
int getTaskWaitType()
Get the type of wait- Returns:
- the wait type
-
getTaskPriority
int getTaskPriority()
The priority of the task- Returns:
- the task priority
-
getTaskStartTimeout
long getTaskStartTimeout()
The time before the task must be accepted- Returns:
- the start timeout
-
getTaskCompletionTimeout
long getTaskCompletionTimeout()
The time before the task must be completed- Returns:
- the completion timeout
-
waitForTask
void waitForTask()
Wait according the wait type
-
stopTask
void stopTask()
Invoked by the threadpool when it wants to stop the task
-
acceptTask
void acceptTask()
The task has been accepted
-
rejectTask
void rejectTask(java.lang.RuntimeException e)
The task has been rejected- Parameters:
e
- any error associated with the rejection
-
isComplete
boolean isComplete()
Is the task complete.- Returns:
- true if compelet, false otherwise
-
-