cyclus/core — Issue #1: Make matched request messages be returned to the requester
Author: rwcarlsen
Created: 2012-01-31 19:57:26+00:00
State: open

Suggested implementation:

* create a connect() method on the message class. This method will create a Channel object and feed a pointer to the channel to both the request message and the offer message. Markets will need to send both finalized request/offer messages back down the hierarchy (not just the offer messages). Messages will obviously need a member variable to carry the channel pointer.

* require the requester to invoke the approve() method on the returned matched message before the transaction is initiated.

* Create a Channel class. This class will need a public method that allows the message class to communicate when an approve() happens. When the channel has receive 2 approves, it immediately begins the material transaction. The channel pulls the material from the supplier. It then pushes the material to the requester. If the push to requester operation fails, the channel will return the pulled material back to the requester.