public class ExpandedConfigurationListenerAdapter
extends java.lang.Object
An ExpandedConfigurationListenerAdapter
wraps an instance
of PropertyListener
. When it receives the
property modification notification from the Apache Configuration,
it translates the ConfigurationEvent
into the corresponding
events for PropertyListener
.
It also has the capability to pause the event delivery through the setPauseListener(boolean)
API.
This class is used as an adapter to attach a PropertyListener
to a Configuration so that
methods in the PropertyListener
will be called when there is a change in the configuration.
Constructor and Description |
---|
ExpandedConfigurationListenerAdapter(PropertyListener listener)
Create a new
ExpandedConfigurationListenerAdapter
that wraps the provided
PropertyListener . |
Modifier and Type | Method and Description |
---|---|
void |
configurationChanged(ConfigurationEvent event) |
boolean |
equals(java.lang.Object obj) |
PropertyListener |
getListener()
Returns the wrapped
PropertyListener . |
int |
hashCode() |
static boolean |
isListenerPaused() |
static void |
setPauseListener(boolean pauseListener) |
public ExpandedConfigurationListenerAdapter(PropertyListener listener)
Create a new ExpandedConfigurationListenerAdapter
that wraps the provided
PropertyListener
.
listener
- to
wrap.java.lang.NullPointerException
- if the configuration or listener is
null
.public static boolean isListenerPaused()
public static void setPauseListener(boolean pauseListener)
public PropertyListener getListener()
PropertyListener
.PropertyListener
.public void configurationChanged(ConfigurationEvent event)
ConfigurationListener#configurationChanged(ConfigurationEvent)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()