Sun Java System Web Server 7.0 Update 4 Developer's Guide to Java Web Applications

The LifecycleListener Interface

Web Server enables you to write classes and customize various phases of the server lifecycle. For instance, you may have a startup code that ensures a remote data source is available for the applications. Such classes are notified by server lifecycle events. The Web Server defines a LifecycleListener interface that users can implement and register with the Server.

The syntax of this interface is as follows public void handleEvent(LifecycleEvent event): receives a lifecycle event.

In its event parameter, the programmatic interface for LifecycleListener provides the following features to the implementation classes: