A primary purpose of the OnixS::CME::Streamlined::MDH::Handler class is to process market data transmitted by CME and to deliver the results to the user for further analysis and processing.
The Handler processes market data asynchronously and uses a concept of events and event listeners to notify a client code about a particular occasion like reception of security definition or direct book update.
Associating event listener with an instance of the OnixS::CME::Streamlined::MDH::Handler class is also called subscribing to an event.
The table below describes primary groups of events exposed by the Handler as well as depicts correspondence between the events, interfaces for listeners and the OnixS::CME::Streamlined::MDH::Handler members to subscribe to an event group:
Listener | Member to register listener | Description |
---|---|---|
OnixS::CME::Streamlined::MDH::HandlerListener | OnixS::CME::Streamlined::MDH::Handler::registerListener | Events triggered by the Handler during market data processing. Events reflect different stages of processing session like entering or leaving recovery cycle, recovery completion status and resuming real-time data processing. Previously, the Handler used a concept of state to inform subscribers about similar events. However, new events allow the subscribers to handle transitions better. For example, in case of recovery failure, previous generations of the Handler signaled on the end of recovery with the subsequent start of a new recovery loop. However, at the end of recovery, there was no possibility to determine whether recovery succeeded or restarted due to updates in a recovery loop or failed at all. In the new events recovery status is exposed via the new parameter of the OnixS::CME::Streamlined::MDH::RecoveryCompletionArgs type. |
OnixS::CME::Streamlined::MDH::OnixS::CME::Streamlined::MDH::MarketDataListener | OnixS::CME::Streamlined::MDH::Handler::registerMarketDataListener | The Handler invokes members of the given listener when it begins or ends processing of various market data entities like a packet or a message. An important aspect, related with the given listener, is the fact that events are triggered only for market data accepted by the Handler and according to the rules defined by CME. THe Handler does not invoke members of the listener for any duplicated or out-of-order packets. The given listener provides additional flexibility for the users while implementing their trading strategies without requiring new groups of events.
|
OnixS::CME::Streamlined::MDH::FeedListener | OnixS::CME::Streamlined::MDH::Handler::registerFeedListener | The OnixS::CME::Streamlined::MDH::FeedListener members are invoked by the Handler each time feed-related event occurs. Feeds are used by the Handler while processing market data transmitted by CME. |