|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.threadpool.BasicTaskWrapper (src)
org.jboss.resource.work.WorkWrapper
Wraps the resource adapter's work.
Field Summary |
Fields inherited from class org.jboss.util.threadpool.BasicTaskWrapper (src) |
TASK_ACCEPTED, TASK_COMPLETED, TASK_NOT_ACCEPTED, TASK_REJECTED, TASK_STARTED, TASK_STOPPED |
Fields inherited from interface org.jboss.util.threadpool.Task (src) |
WAIT_FOR_COMPLETE, WAIT_FOR_START, WAIT_NONE |
Constructor Summary | |
WorkWrapper(JBossWorkManager (src) workManager,
Work (src) work,
int waitType,
long startTimeout,
ExecutionContext (src) executionContext,
WorkListener (src) workListener)
Create a new WorkWrapper |
Method Summary | |
void |
accepted(long time)
The task has been accepted |
void |
completed(long time,
java.lang.Throwable throwable)
The task has been completed |
void |
execute()
Execute the task |
long |
getBlockedElapsed()
Retrieve the time blocked |
long |
getCompletionTimeout()
The time before the task must be completed |
ExecutionContext (src) |
getExecutionContext()
Retrieve the exection context |
int |
getPriority()
The priority of the task |
long |
getStartTimeout()
The time before the task must be accepted |
int |
getWaitType()
Get the type of wait |
Work (src) |
getWork()
Retrieve the work |
WorkException (src) |
getWorkException()
Get any exception |
WorkListener (src) |
getWorkListener()
Retrieve the work listener |
JBossWorkManager (src) |
getWorkManager()
Get the work manager |
void |
rejected(long time,
java.lang.Throwable throwable)
The task has been rejected |
void |
started(long time)
The task has been started |
void |
stop()
Invoked by the threadpool when it wants to stop the task |
java.lang.String |
toString()
|
Methods inherited from class org.jboss.util.threadpool.BasicTaskWrapper (src) |
acceptTask, getElapsedTime, getTaskCompletionTimeout, getTaskPriority, getTaskStartTimeout, getTaskWaitType, isComplete, rejectTask, run, setTask, stopTask, taskAccepted, taskCompleted, taskRejected, taskStarted, taskStop, waitForTask |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WorkWrapper(JBossWorkManager (src) workManager, Work (src) work, int waitType, long startTimeout, ExecutionContext (src) executionContext, WorkListener (src) workListener)
workManager
- the work managerwork
- the workwaitType
- the waitTypeexecutionContext
- the execution context
java.lang.IllegalArgumentException
- for null work, execution context or a negative start timeoutMethod Detail |
public JBossWorkManager (src) getWorkManager()
public Work (src) getWork()
public WorkListener (src) getWorkListener()
public ExecutionContext (src) getExecutionContext()
public long getBlockedElapsed()
public WorkException (src) getWorkException()
public int getWaitType()
Task (src)
getWaitType
in interface Task (src)
public int getPriority()
Task (src)
getPriority
in interface Task (src)
public long getStartTimeout()
Task (src)
getStartTimeout
in interface Task (src)
public long getCompletionTimeout()
Task (src)
getCompletionTimeout
in interface Task (src)
public void execute()
Task (src)
execute
in interface Task (src)
public void stop()
Task (src)
stop
in interface Task (src)
public void accepted(long time)
Task (src)
accepted
in interface Task (src)
time
- the time taken to accept the taskpublic void rejected(long time, java.lang.Throwable throwable)
Task (src)
rejected
in interface Task (src)
time
- the time taken to reject the taskpublic void started(long time)
Task (src)
started
in interface Task (src)
time
- the time taken to start the taskpublic void completed(long time, java.lang.Throwable throwable)
Task (src)
completed
in interface Task (src)
time
- the time taken to reject the taskpublic java.lang.String toString()
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |