Apama Capital Markets Foundation Documentation : Capital Markets Foundation Guide : Market Data Management : Market data subscribers : Setting subscription callbacks : Adding callbacks to subscriber objects
Adding callbacks to subscriber objects
You can add one or more callbacks to a subscription handler. Each callback you add to a subscriber handler applies to subsequent subscriptions made from that subscriber and not to an existing subscription. The following table describes the kinds of callbacks you can add. The actions you execute are all on an xxxSubscriber object.
Callback Type
Action to Execute
Notes
Subscription
addSubscribedCallback()
Adds a callback to be invoked upon subsequent successful subscriptions from this subscriber.
Note that subscribeCb() and multipleSubscribeCb() specify update callbacks and not subscription callbacks.
Update
addUpdateCallback()
Adds a callback to be invoked for subsequent subscriptions from this subscriber each time MDA delivers market data to your application.
Note that if you add one or more update callbacks and then call the subscribeCb() or multipleSubscribeCb() action then the update callbacks you added are ignored and only the specified update callback is executed. See Sample code for adding update callbacks to subscriptions.
Unsubscription
addUnsubscribedCallback()
Adds a callback to be invoked upon a successful unsubscribe action.
Note that if you add one or more unsubscription callbacks and then call the unsubscribeCb() or multipleUnsubscribeCb() action then the unsubscription callbacks you added are ignored and only the specified callback is executed.
Suppose you add some callbacks with addUpdateCallback(), then execute subscribeCb(), and then execute subscribe(). The subscribeCb() action uses the specified update callback and ignores the callbacks you added with the addUpdateCallback() action. However, the subscribe() action uses the callbacks you added with the addUpdateCallback() action even though there was an intervening subscription that specified its own update callback.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback