Set up data listeners
Once the connection to the datastream manager has been established, an application should set up listeners appropriate for the underlying stream type. For example, for the stream type BBA:
if streamType = localConsts.BBA() then {
com.apama.md.WrappedBBA wrappedBBA;
listener l1 := on com.apama.md.WrappedBBA(symbol=underlyingSymbol,
sessionId=uSessionId):wrappedBBA {
for conId in
conData[streamType].pricingParams[wrappedBBA.symbol].keys() {
transformSendBBA( wrappedBBA.bba, conId );
}
}
com.apama.md.BBA bbaInst;
listener l2 := on all com.apama.md.BBA(symbol=underlyingSymbol,
sessionId=uSessionId):bbaInst{
if enableTimestamps then {
bbaInst.__timestamps.add(
constants.AP_TIMESTAMP_DOWNSTREAM_CORRELATOR_FTSC_ENTRY,
timeMgr.getMicroTime() );
}
for conId in
conData[streamType].pricingParams[bbaInst.symbol].keys() {
transformSendBBA(bbaInst, conId );
}
}
conData[streamType].dataListeners[underlyingSymbol].append(l1);
conData[streamType].dataListeners[underlyingSymbol].append(l2);
}