Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E2E1DC97 for ; Sat, 6 Oct 2012 14:07:37 +0000 (UTC) Received: (qmail 74895 invoked by uid 500); 6 Oct 2012 14:07:37 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 74818 invoked by uid 500); 6 Oct 2012 14:07:36 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 74808 invoked by uid 99); 6 Oct 2012 14:07:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 14:07:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 14:07:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9D6EE2388A29 for ; Sat, 6 Oct 2012 14:06:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1395064 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java Date: Sat, 06 Oct 2012 14:06:52 -0000 To: commits@commons.apache.org From: oheger@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121006140652.9D6EE2388A29@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: oheger Date: Sat Oct 6 14:06:51 2012 New Revision: 1395064 URL: http://svn.apache.org/viewvc?rev=1395064&view=rev Log: Added a BuilderListener interface. Added: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java (with props) Added: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java?rev=1395064&view=auto ============================================================================== --- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java (added) +++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java Sat Oct 6 14:06:51 2012 @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.configuration.builder; + +import java.util.EventListener; + +import org.apache.commons.configuration.Configuration; + +/** + *

+ * A listener interface for receiving notifications when the status of a + * {@link ConfigurationBuilder} is changed. + *

+ *

+ * There are use cases when it is of interest to monitor the status of a + * {@code ConfigurationBuilder}. Especially, if the builder creates new result + * objects dynamically, it may be important to know when it was reset because it + * will then return a new result object. This could also mean that the + * {@code Configuration} object managed by the builder has changed. + *

+ *

+ * This interface defines a single method which gets called when the builder was + * reset. A concrete implementation could react on this notification for + * instance by querying a new result object or by marking a reference to the + * current {@code Configuration} as stale. + *

+ * + * @version $Id$ + * @since 2.0 + */ +public interface BuilderListener extends EventListener +{ + /** + * Notifies this listener that a reset was performed on the specified + * {@code ConfigurationBuilder}. + * + * @param builder the builder + */ + void builderReset(ConfigurationBuilder builder); +} Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderListener.java ------------------------------------------------------------------------------ svn:mime-type = text/plain