Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Market Data Management : Using low-level MDA interfaces : Connecting to a datastream
Connecting to a datastream
After an application obtains a specific datastream manager, the manager can be used to connect and receive the required data from the specified session. The connect action makes a request to connect to a datastream and accepts two callbacks, one to be called on success and the other to be used if the connection fails. Upon a successful connection, the callback function will provide a unique connection key for that connection, a com.apama.md.adapter.ConnectionKey object. An application must connect to each symbol of interest. If an attempt is made to connect to the same symbol twice, the datasource implementation determines connection key that will be returned. Generally, a connect with the same control parameters returns the same connection key.

// this action is called if the creation of the BBA manager was successful
action connect( BBAManagerInterface bbaIface ) {

// Connect to a BBA Manager for a given symbol
bbaManagerIface.connect(symbol,
new com.apama.session.CtrlParams,
onConnectionSuccess,
onFailureToConnect);

. . .
}
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback