public abstract class Container extends java.lang.Object implements LifeCycle, EventProvider, java.io.Serializable
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
protected void |
addComponent(java.lang.Object o) |
void |
addEventListener(java.util.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.
|
java.util.Collection |
getComponents() |
boolean |
isFailed() |
boolean |
isStarted() |
protected boolean |
isStarting() |
protected boolean |
isStopping() |
protected void |
removeComponent(java.lang.Object o) |
void |
removeEventListener(java.util.EventListener listener) |
void |
start()
Start the server.
|
void |
stop()
Stop the container.
|
public final void start() throws java.lang.Exception
protected abstract void doStart() throws java.lang.Exception
java.lang.Exception
public boolean isStarted()
public boolean isFailed()
protected boolean isStarting()
protected boolean isStopping()
public final void stop() throws java.lang.InterruptedException
protected abstract void doStop() throws java.lang.Exception
java.lang.Exception
protected void addComponent(java.lang.Object o)
protected void removeComponent(java.lang.Object o)
public void addEventListener(java.util.EventListener listener) throws java.lang.IllegalArgumentException
addEventListener
in interface EventProvider
listener
- ComponentEventListener or LifeCycleEventListenerjava.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()
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.