## org.mortbay.component
Interface LifeCycle

All Known Subinterfaces:
  Connector, Handler, HandlerContainer, RequestLog, SessionIdManager, SessionManager

All Known Implementing Classes:
  AbstractBuffers, AbstractConnector, AbstractHandler, AbstractHandlerContainer, AbstractLifeCycle, AbstractNIOConnector, AbstractSessionManager, Ajp13SocketConnector, BlockingChannelConnector, BoundedThreadPool, Context, ContextDeployer, ContextHandler, ContextHandlerCollection, DefaultHandler, ErrorHandler, ErrorPageErrorHandler, FilterHolder, HandlerCollection, HandlerList, HandlerWrapper, HashSessionIdManager, HashSessionManager, HashUserRealm, Holder, HTAccessHandler, HttpClient, IO, JDBCUserRealm, Jetty6PluginWebAppContext, JettyFactoryBean, LocalConnector, ManyContexts.HelloHandler, ManyHandlers.HelloHandler, ManyHandlers.ParamHandler, MovedContextHandler, NCSARequestLog, OneContext.HelloHandler, OneHandler.HelloHandler, RequestLogHandler, ResourceCache, ResourceHandler, RewriteHandler, SecurityHandler, SelectChannelConnector, SelectorManager, Server, ServletHandler, ServletHandler, ServletHolder, SessionHandler, SocketConnector, SslSelectChannelConnector, SslSocketConnector, StatisticsHandler, ThreadPool, WebAppContext, WebAppDeployer, Win32Service

    public interface LifeCycle

The lifecycle interface for generic components.
Classes implementing this interface have a defined life cycle defined by the methods of this interface.

Author:
  Greg Wilkins (gregw)

Method Summary
`boolean` `isFailed()`
`boolean` `isRunning()`
`boolean` `isStarted()`
`boolean` `isStarting()`
`boolean` `isStopped()`
`boolean` `isStopping()`
`void` `start()` Starts the component.
`void` `stop()` Stops the component.

Method Detail

### start

    void start()
               throws Exception

  Starts the component.

  Throws:
    `Exception` - If the component fails to start
  See Also:
    `isStarted()`, `stop()`, `isFailed()`

### stop

    void stop()
              throws Exception

  Stops the component. The component may wait for current activities to complete normally, but it can be interrupted.

  Throws:
    `Exception` - If the component fails to stop
  See Also:
    `isStopped()`, `start()`, `isFailed()`

### isRunning

    boolean isRunning()

  Returns:
    true if the component is starting or has been started.

### isStarted

    boolean isStarted()

  Returns:
    true if the component has been started.
  See Also:
    `start()`, `isStarting()`

### isStarting

    boolean isStarting()

  Returns:
    true if the component is starting.
  See Also:
    `isStarted()`

### isStopping

    boolean isStopping()

  Returns:
    true if the component is stopping.
  See Also:
    `isStopped()`

### isStopped

    boolean isStopped()

  Returns:
    true if the component has been stopped.
  See Also:
    `stop()`, `isStopping()`

### isFailed

    boolean isFailed()

  Returns:
    true if the component has failed to start or has failed to stop.

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.