Package org.apache.commons.configuration2.reloading

# Class ReloadingEvent

java.lang.Object
java.util.EventObject
org.apache.commons.configuration2.event.Event
org.apache.commons.configuration2.reloading.ReloadingEvent

All Implemented Interfaces:
  `Serializable`

public class ReloadingEvent extends Event

An event that is fired when a reload operation is required.

Events of this type are generated by `ReloadingController` if the need for a reload operation is detected. From the pay-load of the event information about the components involved is available.

Since:
  2.0
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final EventType<ReloadingEvent>`
  `ANY`
  The common event super type for all reloading events.

  ### Fields inherited from class java.util.EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReloadingEvent(ReloadingController source, Object addData)`
  Creates a new instance of `ReloadingEvent` and initializes it.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ReloadingController`
  `getController()`
  Gets the `ReloadingController` which caused this event.
  `Object`
  `getData()`
  Gets an object with additional data about the reload operation.

  ### Methods inherited from class org.apache.commons.configuration2.event.Event

  `appendPropertyRepresentation, getEventType, toString`

  ### Methods inherited from class java.util.EventObject

  `getSource`

  ### Methods inherited from class java.lang.Object

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

- ## Field Details

  - ### ANY

    public static final EventType<ReloadingEvent> ANY
    The common event super type for all reloading events.

- ## Constructor Details

  - ### ReloadingEvent

    public ReloadingEvent(ReloadingController source, Object addData)
    Creates a new instance of `ReloadingEvent` and initializes it.
    Parameters:
      `source` - the controller which generated this event
      `addData` - an arbitrary data object to be evaluated by event listeners

- ## Method Details

  - ### getController

    public ReloadingController getController()
    Gets the `ReloadingController` which caused this event.
    Returns:
      the responsible `ReloadingController`

  - ### getData

    public Object getData()
    Gets an object with additional data about the reload operation. This is the object that was passed to the `ReloadingController` when it was asked to do a reloading check. This is a generic mechanism to pass arbitrary data to reloading listeners.
    Returns:
      additional data about the reload operation (can be null)