public class ExpandedConfigurationListenerAdapter extends Object implements org.apache.commons.configuration.event.ConfigurationListener
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(org.apache.commons.configuration.event.ConfigurationEvent event) |
boolean |
equals(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.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(org.apache.commons.configuration.event.ConfigurationEvent event)
configurationChanged
in interface org.apache.commons.configuration.event.ConfigurationListener
ConfigurationListener.configurationChanged(ConfigurationEvent)
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
Copyright © 2020. All Rights Reserved.