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