Home | Trees | Indices | Help |
---|
|
object --+ | Messaging
This is the main messaging class that implements the basic functionality for Spoon. Messaging implementations that need specific functionality (such as reliablility) will probably want to subclass from this.
There may be multiple instances of Messaging per python process, however there should only be one per network to which a node is a member. There may be a case where one would want a single Messaging instance shared between networks however, and as long as the node ids on the networks do not overlap, you shouldn't have any problems.
You cannot use the acceptMsg decorator with this, for that you have to use the SingletonMessaging class. To register handlers with instances of Messaging, you must use the registerHandler method on the Messaging instance.
|
|||
|
__init__(self,
network=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
||
| registerHandler(self, msgtype, handler) | ||
| unregisterHandler(self, msgtype, handler) | ||
|
handleMessage(self,
src,
msg) Calls the all handlers for the given message. |
||
| setNetwork(self, network) | ||
|
send(self,
dst,
messageStr,
obj) Sends a Messaging message (not just a NetMessage) to the destination node. |
||
Inherited from |
|
|||
Inherited from |
|
|
|
|
|
|
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Mon Nov 27 17:06:02 2006 | http://epydoc.sourceforge.net |