Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.util.threadpool
Interface TaskWrapper

All Superinterfaces:
  Runnable

All Known Implementing Classes:
  BasicTaskWrapper, RunnableTaskWrapper

public interface TaskWrapper
extends Runnable

A task wrapper for a thread pool.

Version:
  $Revision: 1.1.8.1 $
Author:
  Adrian Brock

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 e)` The task has been rejected
`void` | `stopTask()` Invoked by the threadpool when it wants to stop the task
`void` | `waitForTask()` Wait according the wait type

Methods inherited from interface java.lang.Runnable
`run`

Method Detail

### getTaskWaitType

    public int getTaskWaitType()

  Get the type of wait

  Returns:
    the wait type

### getTaskPriority

    public int getTaskPriority()

  The priority of the task

  Returns:
    the task priority

### getTaskStartTimeout

    public long getTaskStartTimeout()

  The time before the task must be accepted

  Returns:
    the start timeout

### getTaskCompletionTimeout

    public long getTaskCompletionTimeout()

  The time before the task must be completed

  Returns:
    the completion timeout

### waitForTask

    public void waitForTask()

  Wait according the wait type

### stopTask

    public void stopTask()

  Invoked by the threadpool when it wants to stop the task

### acceptTask

    public void acceptTask()

  The task has been accepted

### rejectTask

    public void rejectTask(RuntimeException e)

  The task has been rejected

  Parameters:
    `e` - any error associated with the rejection

### isComplete

    public boolean isComplete()

  Indicate if the task has exited the Runnable#run method

  Returns:
    true if the task has exited the Runnable#run method

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.