Jacson

de.spieleck.util
Interface TaskSource

All Known Implementing Classes:
TaskQueue

public interface TaskSource

A source of threads for the ThreadPool.

Version:
0.0
Author:
fsn

Method Summary
 java.lang.Runnable getTask()
          Return the next thing to do.
 boolean isStarted()
          Have we started work yet?
 boolean isWorkLeft()
          Is there more work to do.
 void waitStart()
          Block a thread until we are started
 

Method Detail

getTask

public java.lang.Runnable getTask()
                           throws java.lang.InterruptedException
Return the next thing to do.

Returns:
a Task to be executed.
Throws:
java.lang.InterruptedException - when the running task gets interrupted.

isWorkLeft

public boolean isWorkLeft()
Is there more work to do.

Returns:
true if there is still something to do.

isStarted

public boolean isStarted()
Have we started work yet?

Returns:
true if something has been done.

waitStart

public void waitStart()
               throws java.lang.InterruptedException
Block a thread until we are started

Throws:
java.lang.InterruptedException - when the running task gets interrupted.

Spieleck

Copyleft 2002 spieleck.de.