Class ConfigurationBuilderEvent

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ConfigurationBuilderResultCreatedEvent

    public class ConfigurationBuilderEvent
    extends Event

    A base event class for events generated by a ConfigurationBuilder.

    Configuration builders can trigger a number of different events. All these events are derived from this class. This event base class does not define any additional properties. However, it defines that the event source must be a ConfigurationBuilder.

    Since:
    2.0
    Version:
    $Id: ConfigurationBuilderEvent.java 1790899 2017-04-10 21:56:46Z ggregory $
    See Also:
    Serialized Form
    • Field Detail

      • RESET

        public static final EventType<ConfigurationBuilderEvent> RESET
        The specific event type for builder reset events. Events of this type are generated each time the builder's resetResult() method is called.
      • CONFIGURATION_REQUEST

        public static final EventType<ConfigurationBuilderEvent> CONFIGURATION_REQUEST
        The specific event type for configuration request events. Events of this type are generated each time the builder's getConfiguration() method is called (before the managed configuration is actually accessed and the lock is acquired). This gives listeners the opportunity to perform some checks which may invalidate the configuration, e.g. trigger a reload check. Note: A listener must not call the builder's getConfiguration() method - this will cause an infinite loop!
        See Also:
        ConfigurationBuilder.getConfiguration()
    • Constructor Detail

      • ConfigurationBuilderEvent

        public ConfigurationBuilderEvent​(ConfigurationBuilder<?> source,
                                         EventType<? extends ConfigurationBuilderEvent> evType)
        Creates a new instance of ConfigurationBuilderEvent and sets basic properties.
        Parameters:
        source - the ConfigurationBuilder object which triggered this event (must not be null)
        evType - the type of this event (must not be null)
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null
    • Method Detail

      • getSource

        public ConfigurationBuilder<?> getSource()
        Returns the source of this event as a ConfigurationBuilder.
        Overrides:
        getSource in class java.util.EventObject
        Returns:
        the ConfigurationBuilder which generated this event