|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.jetty.util.LifeCycleThread
public abstract class LifeCycleThread
Base Thread class implementing LifeCycle.
Constructor Summary | |
---|---|
LifeCycleThread()
|
Method Summary | |
---|---|
boolean |
error(Error e)
Handle error from loop. |
boolean |
exception(Exception e)
Handle exception from loop. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LifeCycleThread()
Method Detail |
---|
public boolean isDaemon()
public void setDaemon(boolean d)
public Thread getThread()
public boolean isStarted()
isStarted
in interface LifeCycle
public void start() throws Exception
LifeCycle
start
in interface LifeCycle
Exception
- An arbitrary exception may be thrown.public void stop() throws InterruptedException
LifeCycle
stop
in interface LifeCycle
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 Runnable
public boolean exception(Exception e)
e
- The exception
public boolean error(Error e)
e
- The exception
public abstract void loop() throws InterruptedException, InterruptedIOException, Exception
InterruptedException
InterruptedIOException
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |