public class ReusableThread
extends java.lang.Object
implements java.lang.Runnable
run
method is then called.Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
ReusableThread() |
ReusableThread(java.lang.String thread_name) |
Modifier and Type | Method and Description |
---|---|
boolean |
assignTask(java.lang.Runnable t)
Assigns a task to the thread.
|
void |
assignThreadLocalListener(ThreadLocalListener tl_listener)
Assigns a ThreadLocalListener to the current ReusableThread.
|
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 assignThreadLocalListener(ThreadLocalListener tl_listener)
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-2006 Bela Ban. All Rights Reserved.