Axon.Postman.py Version: Axon 1.0 This class may well disappear in a later version of Axon. Much of it's functionality is now being performed by other classes. TODO: Until deprecation, ensure test suite doc strings accurately detail behaviour. (deregister springs to mind as a poor example.) A postman is a microprocess that knows about linkages, and components, and hence runs concurrently to your components. It can have a number of components & linkages registered with it. Periodically it checks the sources of the linkages it knows about for messages. If it finds some messages it checks where to deliver them to by looking at the sink of the linkage. Assuming it finds a destination to deliver to, the postmans then delivers the messages to the inbox of the assigned destination component. The Postman microprocess handles message delivery along linkages between inboxes and outboxes, usually contained in components. There is one postman per component. Since a postman is a microprocess it runs in parallel with the components it's delivering messages between. It is highly possible this could result in a race hazard if message queues can grow faster than the postman can deliver them. As a result the system provides Synchronised Boxes as well which have a maximum, enforced capacity which works to prevent this issue - at the expense of extra logic in the client A Postman can have a debug name - this is to help differentiate between postmen who are delivering things versus those that aren't if problems arise. Pydoc Style Documentation class postman(Axon.Microprocess.microprocess) __init__(self, debugname='')
The super class's constructor is then called to make this a fully initialised microprocess.
__str__(self) Provides a string representation of a postman, designed for debugging deregister(self, name=None, component=None)
Attempts to partially deal with broken usage. (Which makes this longer than it might need to be otherwise.) deregisterlinkage(self, thecomponent=None, thelinkage=None)
domessagedelivery(self)
islinkageregistered(self, linkage)
main(self) register(self, name, component)
registerlinkage(self, thelinkage)
showqueuelengths(self)
Testdoc Documentation __init__
__str__
deregister
deregisterlinkage
domessagedelivery
register
registerlinkage
... Michael, December 2004 |
Kamaelia
is an open source project originated from and guided by BBC
Research. For more information browse the site or get in
contact.
This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)
(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved