...
Before your adapter can return events, it needs to call
AbstractMarketDataProvider.addSymbolMapping
. This method maps the symbol in an atom to a subclass of {{oforg.marketcetera.trade.Instrument
}}, as in:Code Block language java linenumbers true addSymbolMapping("IBM",new Equity("IBM"));
This allows the parent class to associate the atom to a particular instrument.
- To return events, call
AbstractMarketDataProvider.publishEvents
using theorg.marketcetera.event.Content
from the atom that generated the request and theorg.marketcetera.trade.Instrument
you associated the atom with above.
...
The easiest way to add your provider to the application context is to add a bean to strategyagentstrategyengine.xml
like this:
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="myFeed" class="com.marketcetera.marketdata.myfeed.MyFeed"> <property name="providerRegistry" ref="marketDataManager"/> </bean> |
...