org.mortbay.util
Class Container
java.lang.Objectorg.mortbay.util.Container
- EventProvider, LifeCycle, Serializable
public abstract class Container
extends java.lang.Object
Abstract Container.
Provides base handling for LifeCycle and Component events.
$Id: Container.java,v 1.4 2005/08/13 08:49:59 gregwilkins Exp $
addComponent
protected void addComponent(Object o)
addEventListener
public void addEventListener(EventListener listener)
throws IllegalArgumentExceptionAdd a server event listener.
- addEventListener in interface EventProvider
listener - ComponentEventListener or LifeCycleEventListener
destroy
public void destroy()
Destroy a stopped server.
Remove all components and send notifications to all event
listeners. The HttpServer must be stopped before it can be destroyed.
doStart
protected abstract void doStart()
throws ExceptionDo start operations.
This abstract method is called by start
to perform the actual start operations.
doStop
protected abstract void doStop()
throws ExceptionDo stop operations.
This abstract method is called by stop
to perform the actual stop operations.
getComponents
public Collection getComponents()
isStarting
protected boolean isStarting()
isStopping
protected boolean isStopping()
removeComponent
protected void removeComponent(Object o)
start
public final void start()
throws ExceptionStart the server.
Generate LifeCycleEvents for starting and started either side of a call to doStart
- start in interface LifeCycle
stop
public final void stop()
throws InterruptedExceptionStop the container.
Generate LifeCycleEvents for stopping and stopped either side of a call to doStop
- stop in interface LifeCycle
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.