imx.lib.listener
Interface ActiveInterface

All Known Subinterfaces:
ActiveCollection
All Known Implementing Classes:
ActiveArrayList, ActiveClassMap

public interface ActiveInterface

Each subject of the observer pattern must implement ActiveInterface, so that ListenerInterfaces can register. A concrete ActiveInterface implementation might use a ListenerBag object for easy implementation.

See Also:
ListenerBag

Method Summary
 void addListener(ListenerInterface listener, java.lang.Object eventType)
          As a convention, if the eventType is null, the listener must be registered to all eventTypes.
 void removeListener(ListenerInterface listener, java.lang.Object eventType)
          If eventType is null, the listener is removed from all event types.
 

Method Detail

addListener

void addListener(ListenerInterface listener,
                 java.lang.Object eventType)
As a convention, if the eventType is null, the listener must be registered to all eventTypes.

Parameters:
listener - must not be null
eventType - null means register to all events

removeListener

void removeListener(ListenerInterface listener,
                    java.lang.Object eventType)
If eventType is null, the listener is removed from all event types.

Parameters:
listener - must not be null
eventType - can be null