Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Server Life Cycle Events
- Next: The LifecycleEvent Class

# The LifecycleListener Interface

To create a lifecycle module is to configure a customized class that implements the `com.sun.appserv.server.LifecycleListener` interface. You can create and simultaneously execute multiple lifecycle modules.

The `LifecycleListener` interface defines this method:

    public void handleEvent(com.sun.appserv.server.LifecycleEvent event)
    throws ServerLifecycleException

This method responds to a lifecycle event and throws a `com.sun.appserv.server.``ServerLifecycleException` if an error occurs.

A sample implementation of the `LifecycleListener` interface is the `LifecycleListenerImpl.java` file, which you can use for testing lifecycle events.

- Previous: Server Life Cycle Events
- Next: The LifecycleEvent Class

- © 2010, Oracle Corporation and/or its affiliates