Home | Trees | Index | Help |
---|
Package twisted :: Package python :: Module observable :: Class Publisher |
|
Method Summary | |
---|---|
Publisher.publish(channel,data) | |
Publisher.subscribe(channel, subscriber) | |
Publisher.unsubscribe(channel, subscriber) |
Class Variable Summary | |
---|---|
None |
subscribers
|
Method Details |
---|
publish(self, channel, data)Publisher.publish(channel,data) Publish the given data to a channel -- call all subscriber methods to this channel, with the arguments (self, channel, data), and the default subscriber (named on_%s) with only 'data' as an argument |
subscribe(self, channel, subscriber)Publisher.subscribe(channel, subscriber) Subscribe a 'subscriber' method to a 'channel' key (a python identifier): whenver 'publish' is called with an equivalent 'channel' argument, , the subscriber will be called with the signature (sender, channel, data), where 'sender' is this publisher, 'channel' is the chosen channel key, and 'data' is some arbitrary data. 'publish' will also call the method on_%(channel)s on this object with data as the only argument (plus the implicit self!) |
unsubscribe(self, channel, subscriber)Publisher.unsubscribe(channel, subscriber) Unsubscribe a previously subscribed subscriber method from a particular channel. |
Class Variable Details |
---|
subscribers
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sat Feb 15 21:19:16 2003 | http://epydoc.sf.net |