Table of Contents

Class: Publisher Twisted-0.19.0/twisted/python/observable.py
Methods   
publish
subscribe
unsubscribe
  publish 
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 
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 
unsubscribe (
        self,
        channel,
        subscriber,
        )

Publisher.unsubscribe(channel, subscriber)

Unsubscribe a previously subscribed subscriber method from a particular channel.


Table of Contents

This document was automatically generated on Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0