commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38929] New: - [configuration] Support event listeners for configurations
Date Sat, 11 Mar 2006 15:26:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38929>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38929

           Summary: [configuration] Support event listeners for
                    configurations
           Product: Commons
           Version: 1.2 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: oliver.heger@t-online.de


I would like to suggest creating a ConfigurationEvent class and a
ConfigurationEventListener interface for monitoring changes on configurations.

AbstractConfiguration could act as an event source allowing listeners to
register itself at an instance. Whenever this instance is modified a
notification is sent out to all registered listeners.

The event class could contain
- a reference to the affected Configuration object
- an ID about the type of the event (e.g. property added, property removed,
configuration cleared etc.)
- the name of the affected property if applicable
- the value of the affected property if applicable

The listener interface could be quite simple and contain only a single method:
void configurationChanged(ConfigurationEvent event);

While an implementation should not be too complicated some details need to be
cleared:

- ATM as AbstractConfiguration is implemented an operation could cause multiple
events. For instance setProperty() is implemented as calling clearProperty() and
then addProperty(). Should this be caught and treated as a single event?

- Should a reload of a file based configuration cause an event? Could this be
problematic if a called listener tries to access the configuration?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message