LifecycleEvent (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina, class: LifecycleEvent

# Class LifecycleEvent

java.lang.Object
java.util.EventObject
org.apache.catalina.LifecycleEvent

All Implemented Interfaces:
  `Serializable`

public final class LifecycleEvent extends EventObject
General event for notifying listeners of significant changes on a component that implements the Lifecycle interface.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LifecycleEvent(Lifecycle lifecycle, String type, Object data)`
  Construct a new LifecycleEvent with the specified parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getData()`
  Returns the event data of this event.
  `Lifecycle`
  `getLifecycle()`
  Returns the Lifecycle on which this event occurred.
  `String`
  `getType()`
  Returns the event type of this event.

  ### Methods inherited from class EventObject

  `getSource, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### LifecycleEvent

    public LifecycleEvent(Lifecycle lifecycle, String type, Object data)
    Construct a new LifecycleEvent with the specified parameters.
    Parameters:
      `lifecycle` - Component on which this event occurred
      `type` - Event type (required)
      `data` - Event data (if any)

- ## Method Details

  - ### getData

    public Object getData()
    Returns the event data of this event.
    Returns:
      the event data

  - ### getLifecycle

    public Lifecycle getLifecycle()
    Returns the Lifecycle on which this event occurred.
    Returns:
      the lifecycle

  - ### getType

    public String getType()
    Returns the event type of this event.
    Returns:
      the event type