Class FeatureListenerManager

This class is used by DataStore implementations to provide FeatureListener support for the
FeatureSources they create.

FeatureWriters created by the DataStore will need to make use of this class to provide the
required FeatureEvents. This class has been updated to store listeners using weak references in
order to cut down on memory leaks.

fireFeaturesAdded

Notify all listeners that have registered interest for notification on this event type.

This method is called by:

FeatureWriter.next() with FeatureWriter.hasNext() == false
- when an existing Feature is removed with Tranasaction.AUTO_COMMIT all listeners
registered with SimpleFeatureSource of typeName will be notified.

FeatureWriter.next()with FeatureWriter.hasNext() == false
- when an existing Feature is removed with a Transaction all listeners registered with
SimpleFeatureSource of typeName and with the same Transaction will be notified.

NOTE requiring to fire this event at FeatureWriter.next() is quite a gap inherited
from an old API when FeatureWriter.write() didn't exist yet. It's a good idea though
to fire the event at FeatureWriter.write() instead of FeatureWriter.next() so there are
actually changes to notify for.

fireFeaturesChanged

Notify all listeners that have registered interest for notification on this event type.

This method is called by:

FeatureWriter.next() with FeatureWriter.hasNext() == true
- when an existing Feature is modified with Tranasaction.AUTO_COMMIT all listeners
registered with SimpleFeatureSource of typeName will be notified.

FeatureWriter.next()with FeatureWriter.hasNext() == true
- when an existing Feature is modified, with a Transaction all listeners registered
with SimpleFeatureSource of typeName and with the same Transaction will be notified.

NOTE requiring to fire this event at FeatureWriter.next() is quite a gap inherited
from an old API when FeatureWriter.write() didn't exist yet. It's a good idea though
to fire the event at FeatureWriter.write() instead of FeatureWriter.next() so there are
actually changes to notify for.