Send stuff to two placesSplits a data source sending it to two destinations. Forwards both things sent to its "inbox" inbox and "control" inboxes, so shutdown messages propogate through this splitter. Fully supports delivery to size limited inboxes. Example UsageSend from a data source to two destinations. Do this for both the inbox->outbox path and the signal->control paths, so both destinations receive shutdown messages when the data source finishes: Graphline( SOURCE = MyDataSource(), SPLIT = TwoWaySplitter(), DEST1 = MyDataSink1(), DEST2 = MyDataSink2(), linkages = { ("SOURCE", "outbox") : ("SPLIT", "inbox"), ("SOURCE", "signal") : ("SPLIT", "control") ("SPLIT", "outbox") : ("DEST1", "inbox"), ("SPLIT", "signal") : ("DEST1", "control"), ("SPLIT", "outbox2") : ("DEST1", "inbox"), ("SPLIT", "signal2") : ("DEST1", "control"), } ).run() BehaviourSend a message to the "inbox" inbox of this component and it will be sent on out of the "outbox" and "outbox2" outboxes. This component supports sending to a size limited inbox. If the size limited inbox is full, this component will pause until it is able to send out the data. Send a message to the "control" inbox of this component and it will be sent on out of the "signal" and "signal2" outboxes. If the message is a shutdownMicroprocess message then this component will also terminate immediately. If it is a producerFinished message then this component will finish sending any messages still waiting at its "inbox" inbox, then immediately terminate. Kamaelia.Util.TwoWaySplitter.TwoWaySplitterclass TwoWaySplitter(Axon.Component.component)TwoWaySplitter() -> new TwoWaySplitter component Anything sent to the "inbox" or "control" inboxes is sent on out of the "outbox" and "outbox2" or "signal" and "signal2" outboxes respectively. Inboxes
Outboxes
Methods defined hereWarning! You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers. FeedbackGot a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording! Please leave you feedback here in reply to the documentation thread in the Kamaelia blog. -- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT |
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.