|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.jetty.util.Container
public abstract class Container
Abstract Container. Provides base handling for LifeCycle and Component events.
Constructor Summary | |
---|---|
Container()
|
Method Summary | |
---|---|
protected void |
addComponent(Object o)
|
void |
addEventListener(EventListener listener)
Add a server event listener. |
void |
destroy()
Destroy a stopped server. |
protected abstract void |
doStart()
Do start operations. |
protected abstract void |
doStop()
Do stop operations. |
Collection |
getComponents()
|
boolean |
isStarted()
|
protected boolean |
isStarting()
|
protected boolean |
isStopping()
|
protected void |
removeComponent(Object o)
|
void |
removeEventListener(EventListener listener)
|
void |
start()
Start the server. |
void |
stop()
Stop the container. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Container()
Method Detail |
---|
public final void start() throws Exception
start
in interface LifeCycle
Exception
- An arbitrary exception may be thrown.protected abstract void doStart() throws Exception
Exception
public boolean isStarted()
isStarted
in interface LifeCycle
protected boolean isStarting()
protected boolean isStopping()
public final void stop() throws InterruptedException
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.protected abstract void doStop() throws Exception
Exception
protected void addComponent(Object o)
protected void removeComponent(Object o)
public void addEventListener(EventListener listener) throws IllegalArgumentException
addEventListener
in interface EventProvider
listener
- ComponentEventListener or LifeCycleEventListener
IllegalArgumentException
- If the EventListener type is not supported.public void removeEventListener(EventListener listener)
removeEventListener
in interface EventProvider
public void destroy()
public Collection getComponents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |