java.lang.Runnable
public class ReusableThread
extends java.lang.Object
implements java.lang.Runnable
run
method is then called.Modifier and Type | Field | Description |
---|---|---|
protected static org.apache.commons.logging.Log |
log |
Constructor | Description |
---|---|
ReusableThread() |
|
ReusableThread(java.lang.String thread_name) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
assignTask(java.lang.Runnable t) |
Assigns a task to the thread.
|
boolean |
available() |
|
boolean |
done() |
|
boolean |
isAlive() |
|
void |
resume() |
Resumes the thread.
|
void |
run() |
Delicate piece of code (means very important :-)).
|
void |
start() |
Will always be called from synchronized method, no need to do our own synchronization
|
void |
stop() |
Stops the thread by setting thread=null and interrupting it.
|
void |
suspend() |
Suspends the thread.
|
java.lang.String |
toString() |
|
void |
waitUntilDone() |
public ReusableThread()
public ReusableThread(java.lang.String thread_name)
public boolean done()
public boolean available()
public boolean isAlive()
public void start()
public void stop()
public void suspend()
public void resume()
public boolean assignTask(java.lang.Runnable t)
public void run()
run
in interface java.lang.Runnable
public void waitUntilDone()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.