KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > util > property > BoundPropertyListener


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.util.property;
23
24 /**
25  * The listener interface for receiving bound property events (as well as
26  * property events).
27  *
28  * <p>Classes that are interested in processing a bound property event
29  * implement this interface, and register instance objects with a given
30  * {@link PropertyMap} or via
31  * {@link PropertyManager#addPropertyListener(PropertyListener)}.
32  *
33  * <p>Note that this is not the typical listener interface, as it extends
34  * from {@link PropertyListener}, and defines {@link #getPropertyName()}
35  * which is not an event triggered method. This method serves to instruct
36  * the {@link PropertyMap} the listener is registered with, which property
37  * it will bind to.
38  *
39  * @version <tt>$Revision: 1958 $</tt>
40  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
41  */

42 public interface BoundPropertyListener
43    extends PropertyListener
44 {
45    /**
46     * Get the property name which this listener is bound to.
47     *
48     * @return Property name.
49     */

50    String JavaDoc getPropertyName();
51
52    /**
53     * Notifies that this listener was bound to a property.
54     *
55     * @param map <tt>PropertyMap</tt> which contains property bound to.
56     */

57    void propertyBound(PropertyMap map);
58
59    /**
60     * Notifies that this listener was unbound from a property.
61     *
62     * @param map <tt>PropertyMap</tt> which contains property bound to.
63     */

64    void propertyUnbound(PropertyMap map);
65 }
66
Popular Tags