net.infonode.properties.propertymap
Class PropertyMapWeakListenerManager

java.lang.Object
  extended bynet.infonode.properties.propertymap.PropertyMapWeakListenerManager

public class PropertyMapWeakListenerManager
extends Object

Handles weak PropertyMap listeners which are garbage collected and removed from the PropertyMap object on which it listens when there are no strong or soft references to the listeners.

Since:
IDW 1.2.0
Version:
$Revision: 1.8 $

Method Summary
static void addWeakListener(PropertyMap map, PropertyMapListener listener)
          Adds a weak listener to a PropertyMap.
static void addWeakPropertyChangeListener(PropertyMap map, Property property, PropertyChangeListener listener)
          Adds a weak property change listener to a PropertyMap.
static void addWeakTreeListener(PropertyMap map, PropertyMapTreeListener listener)
          Adds a weak tree listener to a PropertyMap.
static void removeWeakListener(PropertyMap map, PropertyMapListener listener)
          Removes a listener previously added with addWeakListener(PropertyMap, PropertyMapListener).
static void removeWeakPropertyChangeListener(PropertyMap map, Property property, PropertyChangeListener listener)
          Removes a listener previously added with addWeakPropertyChangeListener(PropertyMap, net.infonode.properties.base.Property, net.infonode.properties.util.PropertyChangeListener).
static void removeWeakTreeListener(PropertyMap map, PropertyMapTreeListener listener)
          Removes a listener previously added with addWeakTreeListener(PropertyMap, PropertyMapTreeListener).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addWeakListener

public static void addWeakListener(PropertyMap map,
                                   PropertyMapListener listener)
Adds a weak listener to a PropertyMap.

Parameters:
map - the PropertyMap
listener - the listener

addWeakPropertyChangeListener

public static void addWeakPropertyChangeListener(PropertyMap map,
                                                 Property property,
                                                 PropertyChangeListener listener)
Adds a weak property change listener to a PropertyMap.

Parameters:
map - the PropertyMap
property - the property to listen to changes on
listener - the listener

addWeakTreeListener

public static void addWeakTreeListener(PropertyMap map,
                                       PropertyMapTreeListener listener)
Adds a weak tree listener to a PropertyMap.

Parameters:
map - the PropertyMap
listener - the listener

removeWeakListener

public static void removeWeakListener(PropertyMap map,
                                      PropertyMapListener listener)
Removes a listener previously added with addWeakListener(PropertyMap, PropertyMapListener).

Parameters:
map - the map on which the listener was added
listener - the listener

removeWeakPropertyChangeListener

public static void removeWeakPropertyChangeListener(PropertyMap map,
                                                    Property property,
                                                    PropertyChangeListener listener)
Removes a listener previously added with addWeakPropertyChangeListener(PropertyMap, net.infonode.properties.base.Property, net.infonode.properties.util.PropertyChangeListener).

Parameters:
map - the map on which the listener was added
property - the property on which the listener listens to changes
listener - the listener

removeWeakTreeListener

public static void removeWeakTreeListener(PropertyMap map,
                                          PropertyMapTreeListener listener)
Removes a listener previously added with addWeakTreeListener(PropertyMap, PropertyMapTreeListener).

Parameters:
map - the map on which the listener was added
listener - the listener


Copyright © 2007 NNL Technology AB. All Rights Reserved.