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
.
Modifier and Type | Field and Description |
---|---|
static EventType<ConfigurationBuilderEvent> |
ANY
The common super type for all events related to configuration builders.
|
static EventType<ConfigurationBuilderEvent> |
CONFIGURATION_REQUEST
The specific event type for configuration request events.
|
static EventType<ConfigurationBuilderEvent> |
RESET
The specific event type for builder reset events.
|
source
Constructor and Description |
---|
ConfigurationBuilderEvent(ConfigurationBuilder<?> source,
EventType<? extends ConfigurationBuilderEvent> evType)
Creates a new instance of
ConfigurationBuilderEvent and sets
basic properties. |
Modifier and Type | Method and Description |
---|---|
ConfigurationBuilder<?> |
getSource()
Returns the source of this event as a
ConfigurationBuilder . |
appendPropertyRepresentation, getEventType, toString
public static final EventType<ConfigurationBuilderEvent> ANY
public static final EventType<ConfigurationBuilderEvent> RESET
resetResult()
method is called.public static final EventType<ConfigurationBuilderEvent> CONFIGURATION_REQUEST
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!ConfigurationBuilder.getConfiguration()
public ConfigurationBuilderEvent(ConfigurationBuilder<?> source, EventType<? extends ConfigurationBuilderEvent> evType)
ConfigurationBuilderEvent
and sets
basic properties.source
- the ConfigurationBuilder
object which triggered
this event (must not be null)evType
- the type of this event (must not be null)IllegalArgumentException
- if a required parameter is nullpublic ConfigurationBuilder<?> getSource()
ConfigurationBuilder
.getSource
in class EventObject
ConfigurationBuilder
which generated this eventCopyright © 2001–2020 The Apache Software Foundation. All rights reserved.