core
Core package of pubsub, holding the publisher, listener, and topic
object modules. Functions defined here are used internally by
pubsub so that the right modules can be found later, based on the
selected messaging protocol.
Indeed some of the API depends on the messaging
protocol used. For instance sendMessage(), defined in publisher.py,
has a different signature (and hence implementation) for the kwargs
protocol than for the arg1 protocol.
The most convenient way to
support this is to put the parts of the package that differ based
on protocol in separate folders, and add one of those folders to
the package’s __path__ variable (defined automatically by the Python
interpreter when __init__.py is executed). For instance, code
specific to the kwargs protocol goes in the kwargs folder, and code
specific to the arg1 protocol in the arg1 folder. Then when doing
“from pubsub.core import listener”, the correct listener.py will be
found for the specified protocol. The default protocol is kwargs.
Only one protocol can be used in an application. The default protocol,
if none is chosen by user, is kwargs, as selected by the call to
_prependModulePath() at end of this file.
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
license: | BSD, see LICENSE.txt for details. |
Modules Summary
callables |
Low level functions and classes related to callables. |
datamsg |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
imp2 |
The _resolve_name and _import_module were taken from the backport of |
listener |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
listenerbase |
Higher-level classes and functions related to listening of pubsub messages. |
listenerimpl |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
notificationmgr |
Manages notifications by pubsub. Pubsub notifies this manager once for |
notificationmgr_old |
First generation of notification handler could only have one registered |
policies |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
publisher |
Mixin for publishing messages to a topic’s listeners. This will be |
publisherbase |
Provides the Publisher class, which manages subscribing callables to |
publishermixin |
Mixin for publishing messages to a topic’s listeners. This will be |
topicargspec |
Definitions related to listener signature specification. |
topicargspecimpl |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
topicdefnprovider |
Everything that has to do with topic definition tree import/export. |
topicexc |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
topicmgr |
Everything regarding the concept of topic. |
topicmgrimpl |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
topicobj |
Represent topics in pubsub. Topic objects contain all information about |
topictreetraverser |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
topicutils |
Various little utilities used by topic-related modules. |
treeconfig |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
validatedefnargs |
copyright: | Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. |
|
weakmethod |
This module provides a basic “weak method” implementation. It is necessary |
Functions
-
setMsgDataArgName(stage, listenerArgName, senderArgNameAny=False)
-
setMsgProtocol(protocol)