Table Of Contents

Previous topic

listener

Next topic

ListenerBase

This Page

phoenix_title listenerbase

Higher-level classes and functions related to listening of pubsub messages. Listeners are callable objects that get subscribed to a pubsub topic. Listeners are deemed “invalid” or “inadequate” (used interchangeably) by pubsub if they wouldn’t be able to receive all message data of a topic message. This module includes this validation functionality, which varies based on the pubsub messaging protocol used.

Note that a Listener instance holds its callable listener only by weak reference so it doesn’t prevent the callable from being garbage collected when callable is no longer in use by the application.

In order for a listener to subscribe to a topic, it must adhere to that topic’s “listener protocol specification” (LPS). A subscription will fail (via a ListenerInadequate exception) if this is not the case. For instance, if topic A has an LPS “arg1, arg2=None””, then only listeners of the form callable([self,] arg1, arg2=something) will be accepted.

copyright:Copyright 2006-2009 by Oliver Schoenborn, all rights reserved.
license:BSD, see LICENSE.txt for details.

class_hierarchy Inheritance Diagram

Inheritance diagram for module listenerbase

Inheritance diagram of listenerbase


class_summary Classes Summary

ListenerBase Any listener that is subscribed to pubsub topics is stored by weak
ValidatorBase Validates listeners. It checks whether the listener given to