abstract class AbstractLogEnabledInstrumentableStartable
extends org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
implements org.apache.avalon.framework.activity.Startable, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Thread |
m_runner
Reference to the worker thread.
|
private boolean |
m_runnerStop
Flag set when the m_runner thread has been asked to stop.
|
| Constructor and Description |
|---|
AbstractLogEnabledInstrumentableStartable()
Creates a new AbstractLogEnabledInstrumentableStartable.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStopping()
Returns true when the component is in the process of being stopped.
|
void |
run()
Run method which is responsible for launching the runner method and
handling the shutdown cycle.
|
protected abstract void |
runner()
Runner method that will be called when the component is started.
|
void |
start()
Starts the runner thread.
|
void |
stop()
Stops the runner thread, blocking until it has stopped.
|
protected void |
stopRunner()
Called when the component is being stopped, the isStopping method will
always return true when this method is called.
|
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableNameprivate java.lang.Thread m_runner
private boolean m_runnerStop
public AbstractLogEnabledInstrumentableStartable()
public void start()
throws java.lang.Exception
start in interface org.apache.avalon.framework.activity.Startablejava.lang.Exception - If there are any problems.public void stop()
throws java.lang.Exception
stop in interface org.apache.avalon.framework.activity.Startablejava.lang.Exception - If there are any problems stopping the component.public void run()
run in interface java.lang.Runnableprotected void stopRunner()
throws java.lang.Exception
java.lang.Exception - If there are any problemsprotected abstract void runner()
public boolean isStopping()