| |
- Listener
- Notifier
class Listener |
|
A listener is notified by one or more Notifiers.
instance attributes:
notifiers - a list of Notifier objects |
|
Methods defined here:
- __init__(self)
- add_notifier(self, notifier)
- add a notifier to the list (and self to notifiers' list)
- receive_notify(self, source, message)
- receive a message from a notifier. Implementing classes should override this.
- rem_notifier(self, notifier)
- remove a notifier from the list (and self from notifiers' list)
|
class Notifier |
|
A notifier keeps a list of Listener instances that are to be informed of certain events.
instance attributes:
listeners - a list of Listener instances |
|
Methods defined here:
- __init__(self)
- add_listener(self, listener)
- add a listener to the list (and self to listers' list)
- rem_listener(self, listener)
- remove a listener from the list (and self from listers' list)
- send_notify(self, message)
- send a message to all listeners
| |