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

# Class ContainerEvent

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

All Implemented Interfaces:
  `Serializable`

public final class ContainerEvent extends EventObject
General event for notifying listeners of significant changes on a Container.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContainerEvent(Container container, String type, Object data)`
  Construct a new ContainerEvent with the specified parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Container`
  `getContainer()`
  Return the Container on which this event occurred.
  `Object`
  `getData()`
  Return the event data of this event.
  `String`
  `getType()`
  Return the event type of this event.
  `String`
  `toString()`
  Return a string representation of this event.

  ### Methods inherited from class EventObject

  `getSource`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### ContainerEvent

    public ContainerEvent(Container container, String type, Object data)
    Construct a new ContainerEvent with the specified parameters.
    Parameters:
      `container` - Container on which this event occurred
      `type` - Event type
      `data` - Event data

- ## Method Details

  - ### getData

    public Object getData()
    Return the event data of this event.
    Returns:
      The data, if any, associated with this event.

  - ### getContainer

    public Container getContainer()
    Return the Container on which this event occurred.
    Returns:
      The Container on which this event occurred.

  - ### getType

    public String getType()
    Return the event type of this event.
    Returns:
      The event type of this event. Although this is a String, it is safe to rely on the value returned by this method remaining consistent between point releases.

  - ### toString

    public String toString()
    Return a string representation of this event.
    Overrides:
      `toString` in class `EventObject`