OnixS C++ B3 Binary UMDF Market Data Handler  1.7.0
API documentation
Event Listeners

The handler uses a concept of events and event listeners to notify the client code about various aspects of market data processing and deliver data to the user (e.g., receiving a security definition or a direct book update).

The SDK groups events and provides classes with virtual members (event listeners) for each group. Client code may override any or all listener members to implement the processing of a particular event.

Associating an event listener with an instance of the OnixS::B3::MarketData::UMDF::Handler class is called subscribing to events.

Note
Associating the listener with the OnixS::B3::MarketData::UMDF::Handler instance must be performed while the handler is in the stopped state. Once the market data processing is started, assigning event listeners is not allowed and leads to throwing an exception.

Events groups

The table below describes events groups and shows the correspondence between the events, listeners and handler settings methods that are used to subscribe to events:

Listener Method Description
OnixS::B3::MarketData::UMDF::ErrorListener The handler invokes the event listener member to notify about errors. An error means that the Handler encounters some unusual issue and can not continue processing.
OnixS::B3::MarketData::UMDF::WarningListener The handler invokes the event listener member to notify about warnings. A warning means that the Handler gets some unusual issue, warns about it but can continue processing.
OnixS::B3::MarketData::UMDF::HandlerStateListener The handler invokes the event listener to notify about its state changes.
OnixS::B3::MarketData::UMDF::MessageListener The handler invokes the event listener to notify about market data messages are received while executing handler.
OnixS::B3::MarketData::UMDF::OrderBookListener The handler invokes the event listener to notify about order book state updates while executing.

The sample below demonstrates listening to Handler's events:

handler.registerErrorListener(&errorListener);
handler.registerWarningListener(&warningListener);
handler.registerMessageListener(&messageListener);
handler.registerOrderBookListener(&orderBookListener);