Interface
caplin.trading.trademodel

InstrumentDataSubscriber

InstrumentDataSubscriber instances are responsible for receiving asynchronous instrument data streams from some publisher (the server) and forwarding them to a trade leg that is connected with that instrument. The InstrumentDataSubscriber interface exists to decouple the details of the data transfer protocol away from the trade model. An InstrumentDataSubscriber only provides data for a single instrument, to a single trade leg (at any one time).

Constructor Summary

Attributes Name and Description
caplin.trading.trademodel.InstrumentDataSubscriber()

Method Summary

Attributes Name and Description
void subscribeTradeLeg(caplin.trading.trademodel.TradeLeg oTradeLeg, String sInstrumentName, Array pFieldNames)

Registers a trade leg to receive data for a particular instrument.

void unsubscribeTradeLeg()

Deallocates any resources used by the subscriber.

Constructor Detail

caplin.trading.trademodel.InstrumentDataSubscriber()

Method Detail

void subscribeTradeLeg(caplin.trading.trademodel.TradeLeg oTradeLeg, String sInstrumentName, Array pFieldNames)

Registers a trade leg to receive data for a particular instrument.

Parameters
caplin.trading.trademodel.TradeLeg oTradeLeg The trade leg that will receive the data.
String sInstrumentName The name of the financial instrument for which the leg requires data.
Array pFieldNames The list of fields for which the leg requires data.

void unsubscribeTradeLeg()

Deallocates any resources used by the subscriber.

Correctly implementing this method is important, since if users are not un-subscribed for instruments they are no longer viewing, then serious performance problems are likely to occur.