org.tm4j.panckoucke.impl.notification .NotificationDispatcher

Description

The send-mechanics of this Dispatcher works with a copy of the listener-registry. Therefore receivers may safely remove themselves from the receivers-list while processing an event.

Inheritance Hierarchy

Method Summary
void addListener(org.tm4j.panckoucke.notification.NotificationListener l,org.tm4j.panckoucke.notification.NotificationType type)
adds NotificationListener l as a listener for Notifications of type NotificationType attempts to add a listener twice are silently ignored.
NotificationDispatcher getInstance()
Returns the singleton instance
java.util.Map getListeners()
returns an umodifiable copy of the listeners map of this dispatcher.
void removeListener(org.tm4j.panckoucke.notification.NotificationListener l)
removes NotificationListener l as a receiver for all NotificationType .
void removeListener(org.tm4j.panckoucke.notification.NotificationListener l,org.tm4j.panckoucke.notification.NotificationType type)
removes NotificationListener l as a receiver for NotificationType type.
void run()
void send(org.tm4j.panckoucke.notification.Notification n)
sends an Event to all registered Listeners uses a copy of the listeners-List, so it is fine for listeners to modify their registries from inside an event-notification
void sendNotification(org.tm4j.panckoucke.notification.NotificationType type,java.lang.Object o)
Sends a Notification of Type type with one relatedObject
void sendNotification(org.tm4j.panckoucke.notification.NotificationType type,java.util.List li)
Sends a Notification of Type type including a list of relatedObjects
void sendNotification(org.tm4j.panckoucke.notification.StateChangedNotification changeNote)
Sends a Notification of Type TM_STATE_CHANGED with changeNote as the relatedObject