Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk firewall : Receiving approved orders from a risk firewall : Setting accepted-order callbacks
Setting accepted-order callbacks
After a risk firewall approves an order, it calls any accepted-order callbacks that you have added to the order receiver that receives the approved order. For example, you might want to add an accepted-order callback that forwards approved orders to a particular adapter.
To add an accepted-order callback, call com.apama.firewall.OrderReceiver.addAcceptedOrderCallback(). This action takes one argument, which is the callback to be executed. The callback itself takes one argument, which is a com.apama.oms.NewOrder object. The action registers a callback with the risk firewall instance it is executed on. The registered callback is executed whenever the risk firewall approves an order. You can add more than one accepted-order callback.
The addAcceptedOrderCallback() action returns a unique integer reference Id that you can use to remove the callback at a later date if required.
To remove a previously-added accepted-order callback, call OrderReceiver.removeAcceptedOrderCallback() and specify the integer reference Id that was returned when you added the callback. To remove all previously-added accepted-order callbacks, call the OrderReceiver.clearAcceptedOrderCallbacks() action.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback