Interface Lifecycle

All Known Subinterfaces:
Container, Context, Engine, Executor, Host, Server, Service, WebResourceRoot, WebResourceSet, Wrapper
All Known Implementing Classes:
AbstractAccessLogValve, AbstractArchiveResourceSet, AbstractFileResourceSet, AbstractResourceSet, AbstractSingleArchiveResourceSet, AccessLogValve, AuthenticatedUserRealm, AuthenticatorBase, BackupManager, BasicAuthenticator, ClusterManagerBase, ClusterSingleSignOn, CombinedRealm, Connector, ContainerBase, CrawlerSessionManagerValve, DataSourceRealm, DataSourceStore, DeltaManager, DigestAuthenticator, DirResourceSet, EmptyResourceSet, ErrorReportValve, ExtendedAccessLogValve, ExtractingRoot, FailedContext, FileResourceSet, FileStore, FilterValve, FormAuthenticator, HealthCheckValve, JAASMemoryLoginModule, JAASRealm, JarResourceSet, JarWarResourceSet, JDBCAccessLogValve, JNDIRealm, JsonAccessLogValve, JsonErrorReportValve, JvmRouteBinderValve, LifecycleBase, LifecycleMBeanBase, LoadBalancerDrainingValve, LockOutRealm, ManagerBase, MapperListener, MemoryRealm, NamingResourcesImpl, NonLoginAuthenticator, NullRealm, ParallelWebappClassLoader, PersistentManager, PersistentManagerBase, PersistentValve, ProxyErrorReportValve, RealmBase, RemoteAddrValve, RemoteCIDRValve, RemoteHostValve, RemoteIpValve, ReplicatedContext, ReplicationValve, RequestFilterValve, RewriteValve, SemaphoreValve, SessionIdGeneratorBase, SimpleTcpCluster, SingleSignOn, SpnegoAuthenticator, SSLAuthenticator, SSLValve, StandardContext, StandardEngine, StandardHost, StandardManager, StandardPipeline, StandardRoot, StandardServer, StandardService, StandardSessionIdGenerator, StandardThreadExecutor, StandardVirtualThreadExecutor, StandardWrapper, StoreBase, StuckThreadDetectionValve, Tomcat.ExistingStandardWrapper, UserDatabaseRealm, ValveBase, WarResourceSet, WebappClassLoader, WebappClassLoaderBase, WebappLoader

public interface Lifecycle
Common interface for component life cycle methods. Catalina components may implement this interface (as well as the appropriate interface(s) for the functionality they support) in order to provide a consistent mechanism to start and stop the component.
The valid state transitions for components that support Lifecycle are:
            start()
  -----------------------------
  |                           |
  | init()                    |
 NEW -»-- INITIALIZING        |
 | |           |              |     ------------------«-----------------------
 | |           |auto          |     |                                        |
 | |          \|/    start() \|/   \|/     auto          auto         stop() |
 | |      INITIALIZED --»-- STARTING_PREP --»- STARTING --»- STARTED --»---  |
 | |         |                                                            |  |
 | |destroy()|                                                            |  |
 | --»-----«--    ------------------------«--------------------------------  ^
 |     |          |                                                          |
 |     |         \|/          auto                 auto              start() |
 |     |     STOPPING_PREP ----»---- STOPPING ------»----- STOPPED -----»-----
 |    \|/                               ^                     |  ^
 |     |               stop()           |                     |  |
 |     |       --------------------------                     |  |
 |     |       |                                              |  |
 |     |       |    destroy()                       destroy() |  |
 |     |    FAILED ----»------ DESTROYING ---«-----------------  |
 |     |                        ^     |                          |
 |     |     destroy()          |     |auto                      |
 |     --------»-----------------    \|/                         |
 |                                 DESTROYED                     |
 |                                                               |
 |                            stop()                             |
 ----»-----------------------------»------------------------------

 Any state can transition to FAILED.

 Calling start() while a component is in states STARTING_PREP, STARTING or
 STARTED has no effect.

 Calling start() while a component is in state NEW will cause init() to be
 called immediately after the start() method is entered.

 Calling stop() while a component is in states STOPPING_PREP, STOPPING or
 STOPPED has no effect.

 Calling stop() while a component is in state NEW transitions the component
 to STOPPED. This is typically encountered when a component fails to start and
 does not start all its sub-components. When the component is stopped, it will
 try to stop all sub-components - even those it didn't start.

 Attempting any other transition will throw LifecycleException.

 
The LifecycleEvents fired during state changes are defined in the methods that trigger the changed. No LifecycleEvents are fired if the attempted transition is not valid.
Author:
Craig R. McClanahan