Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina
Interface Lifecycle

All Known Implementing Classes:
  AccessLogValve, AuthenticatorBase, CertificatesValve, ContainerBase, Embedded, FastEngineMapper, FileLogger, HttpConnector, HttpConnector, PersistentManagerBase, RealmBase, SingleSignOn, StandardCluster, StandardLoader, StandardManager, StandardPipeline, StandardServer, StandardService, StoreBase, WarpConnector, WebappClassLoader, WebappLoader

public interface Lifecycle

Common interface for component life cycle methods. Catalina components may, but are not required to, 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.

Version:
  $Revision: 1.3 $ $Date: 2001/07/22 20:13:30 $
Author:
  Craig R. McClanahan

Field Summary
`static java.lang.String` | `START_EVENT` The LifecycleEvent type for the "component start" event.
`static java.lang.String` | `STOP_EVENT` The LifecycleEvent type for the "component stop" event.

Method Summary
`void` | `addLifecycleListener(LifecycleListener listener)` Add a LifecycleEvent listener to this component.
`void` | `removeLifecycleListener(LifecycleListener listener)` Remove a LifecycleEvent listener from this component.
`void` | `start()` Prepare for the beginning of active use of the public methods of this component.
`void` | `stop()` Gracefully terminate the active use of the public methods of this component.

Field Detail

### START_EVENT

    public static final java.lang.String START_EVENT

  The LifecycleEvent type for the "component start" event.

  See Also:
    Constant Field Values

### STOP_EVENT

    public static final java.lang.String STOP_EVENT

  The LifecycleEvent type for the "component stop" event.

  See Also:
    Constant Field Values

Method Detail

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Add a LifecycleEvent listener to this component.

  Parameters:
    `listener` - The listener to add

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Remove a LifecycleEvent listener from this component.

  Parameters:
    `listener` - The listener to remove

### start

    public void start()
               throws LifecycleException

  Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners.

  Throws:
    `java.lang.IllegalStateException` - if this component has already been started
    `LifecycleException` - if this component detects a fatal error that prevents this component from being used

### stop

    public void stop()
              throws LifecycleException

  Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component. It should also send a LifecycleEvent of type STOP_EVENT to any registered listeners.

  Throws:
    `java.lang.IllegalStateException` - if this component has not been started
    `LifecycleException` - if this component detects a fatal error that needs to be reported

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.