|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mortbay.util.LifeCycleThread
Base Thread class implementing LifeCycle.
Constructor Summary | |
LifeCycleThread()
|
Method Summary | |
boolean |
error(java.lang.Error e)
Handle error from loop. |
boolean |
exception(java.lang.Exception e)
Handle exception from loop. |
java.lang.Thread |
getThread()
|
boolean |
isDaemon()
|
boolean |
isStarted()
|
abstract void |
loop()
|
void |
run()
|
void |
setDaemon(boolean d)
|
void |
start()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LifeCycleThread()
Method Detail |
public boolean isDaemon()
public void setDaemon(boolean d)
public java.lang.Thread getThread()
public boolean isStarted()
isStarted
in interface LifeCycle
public void start() throws java.lang.Exception
LifeCycle
start
in interface LifeCycle
java.lang.Exception
- An arbitrary exception may be thrown.public void stop() throws java.lang.InterruptedException
LifeCycle
stop
in interface LifeCycle
java.lang.InterruptedException
- Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.public final void run()
run
in interface java.lang.Runnable
public boolean exception(java.lang.Exception e)
e
- The exception
public boolean error(java.lang.Error e)
e
- The exception
public abstract void loop() throws java.lang.InterruptedException, java.io.InterruptedIOException, java.lang.Exception
java.lang.InterruptedException
java.io.InterruptedIOException
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |