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 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