Apama Capital Markets Foundation  9.12.0.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
AP_MDM_AdapterInterface Struct Reference

#include <MDM_MarketDataInterface.h>

Public Attributes

void(* connect )(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss)
 
void(* disconnect )(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss)
 
const char *(* getKey )(void *transportInternals, const char *symbol, AP_int64 sourceId, AP_MDM_StreamType streamType, HashMap *ctrlParams)
 

Detailed Description

Adapter Market Data interface

The adapter must fill out this structure with working functions and provide it when initiaizing the Market Data library with AP_MDM_Init.

See also
AP_MDM_Init

Member Data Documentation

void(* AP_MDM_AdapterInterface::connect)(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss)

Connect Callback

This is called when a new subscription has been identified by the Market Data library and the adapter should subscribe to the external source for the symbol contained in the subKey. If successful AP_MDM_ConnectSuccess() should called, else AP_MDM_ConnectFailed().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
subKeyThe unique subscription key for this connection generated by a call to getKey.
streamTypeThe data stream type this connection is for.
ctrlParamsThe control parameters for this connection.
tssThe set of timestamps from the connect event.
See also
getKey
disconnect
AP_MDM_ConnectSuccess
AP_MDM_ConnectFailed
void(* AP_MDM_AdapterInterface::disconnect)(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss)

Disconnect Callback

This is called when the last unsubscription for a symbol has been identified by the Market Data library and the adapter should unsubscribe from the external source for the symbol contained in the subKey. If successful AP_MDM_DisconnectSuccess() should called, else AP_MDM_DisconnectFailed().

Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
subKeyThe unique subscription key for this disconnection.
streamTypeThe data stream type this disconnection is for.
ctrlParamsThe control parameters for this disconnection.
tssThe set of timestamps from the disconnect event.
See also
connect
AP_MDM_DisconnectSuccess
AP_MDM_DisconnectFailed
const char*(* AP_MDM_AdapterInterface::getKey)(void *transportInternals, const char *symbol, AP_int64 sourceId, AP_MDM_StreamType streamType, HashMap *ctrlParams)

Subscription Key Generation Callback

This is called when any subscription is received and the adapter should generate a subscription key. It is used to detect duplicate subscriptions. The basic structure of the key should be:-

  • "symbol:streamType:sourceId:controlparam1=val1;controlParam2=val2;...:"
Parameters
transportInternalsA pointer to the transport internals provided during initiaization.
symbolThe symbol this subscription is for.
sourceIdThe source Id this subscription is for.
streamTypeThe data stream type this subscription is for.
ctrlParamsThe control parameters for this subscription.
Returns
The generated subscription key.
See also
connect

The documentation for this struct was generated from the following file: