OnixS CBOE CMi2 Trading Handler for C++  1.1.3.0
Listening to incoming messages

Events in the Handler

Once the Handler is started, it listens to a message from the CBOE CMi2 message flow, processes it and invokes client code for further processing.

The Handler processes messages asynchronously and uses concept of events and event listeners to notify client code about a particular occasion like reception of record.

Listening for a particular Event

For each event like Error Occurred Handler provides an interface (C++ class with pure virtual members) like OnixS::CBOE::Trading::CMi2::ErrorListener. Client code must implement this interface (C++ class) to be able to handle events of a particular type. The Handler also exposes a member like OnixS::CBOE::Trading::CMi2::Handler::registerErrorListener which allows to associate an instance of the event handler with an appropriate event in bounds of a particular instance of the OnixS::CBOE::Trading::CMi2::Handler class.

Note
Associating listener for a particular event with an instance of the OnixS::CBOE::Trading::CMi2::Handler class must be performed while the Handler is in disconnected state. Once the Handler is started, changing listener-event associations is not allowed and can lead to unpredictable behavior as well as can cause unexpected errors.

Associating event listener with an instance of the OnixS::CBOE::Trading::CMi2::Handler class is also called subscribing to an event.

Primary High-level Events

There're multiple events exposed by the Handler. All events can be logically divided onto high- and low- level event sub-set. High-level events reflect various results of message processing done by the Handler. Low-level events are designed for more control over data processing as well as for more flexibility and described in different section of this documentation including Advanced Programming section.