OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  11.0.0
API documentation
EobiHandlerManager.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
22 #include <vector>
23 
26 
27 namespace OnixS
28 {
29  namespace Eurex
30  {
31  namespace MarketData
32  {
33  class ErrorListener;
34  class WarningListener;
35  class ReplayListener;
36  class HandlerStateListener;
37  class PacketListener;
38  class FeedEngine;
39 
40  namespace EOBI
41  {
42  struct EobiHandlerSettings;
43  class EobiHandler;
44  class OrderDataListener;
45  class TradeDataListener;
46  class StateChangeListener;
47  class ReferenceDataListener;
48  class SnapshotListener;
49  class MessageListener;
50  class OrderBookListener;
51 
52  /// EOBI Handler Manager.
53  class ONIXS_EUREX_EMDI_API EobiHandlerManager
54  {
55  public:
56  /// Performs instance initialization.
57  /// @param settings defines values for various options
58  /// which affect handler behavior like enabling logging
59  /// during execution of the handler.
60  explicit EobiHandlerManager (const EobiHandlerSettings& settings,
61  const std::string& = ONIXS_COMPILER_INFO);
62 
63  /// Finalizes the Handler.
64  virtual ~EobiHandlerManager();
65 
66  /// Assigns listener for errors occurred while executing handler.
67  /// It's permissible to change the listener multiple times during
68  /// handler's life-time, but only when handler is in disconnected state.
69  /// @throw OperationException if handler not disconnected
70  void registerErrorListener (ErrorListener* listener);
71 
72  /// Assigns listener for warnings occurred while executing handler.
73  /// It's permissible to change the listener multiple times during
74  /// handler's life-time, but only when handler is in disconnected state.
75  /// @throw OperationException if handler not disconnected
76  void registerWarningListener (WarningListener* listener);
77 
78  void registerHandlerStateListener (HandlerStateListener* listener);
79  void registerOrderDataListener (EOBI::OrderDataListener* listener);
80  void registerTradeDataListener (EOBI::TradeDataListener* listener);
81  void registerStateChangeListener (EOBI::StateChangeListener* listener);
82  void registerReferenceDataListener (EOBI::ReferenceDataListener* listener);
83  void registerSnapshotListener (EOBI::SnapshotListener* listener);
84  void registerMessageListener (EOBI::MessageListener* listener);
85  void registerOrderBookListener (EOBI::OrderBookListener* listener);
86  void registerPacketListener(PacketListener* listener);
87 
88 
89  /// Start manager.
90  ///
91  /// @note This action is asynchronous.
92  /// @throw std::exception in case of unable to start all necessary EMDI handlers.
93  void start (const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames, FeedEngine& feedEngine);
94 
95  /// Stop manager.
96  void stop ();
97 
98  private:
99  EobiHandlerManager (const EobiHandlerManager&); //no implementation
100  EobiHandlerManager& operator = (const EobiHandlerManager&); //no implementation
101 
102  private:
103  struct Impl;
104  Impl* impl_;
105  ErrorListener* errorListener_;
106  WarningListener* warningListener_;
107  HandlerStateListener* handlerStateListener_;
108  EOBI::OrderDataListener* orderDataListener_;
109  EOBI::TradeDataListener* tradeDataListener_;
110  EOBI::StateChangeListener* stateChangeListener_;
111  EOBI::ReferenceDataListener* referenceDataListener_;
112  EOBI::SnapshotListener* snapshotListener_;
113  EOBI::MessageListener* messageListener_;
114  EOBI::OrderBookListener* orderBookListener_;
115  PacketListener* packetListener_;
116  };
117  }
118  }
119  }
120 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:337
Definition: Defines.h:30
Product State Change listener.
EOBI handler configuration settings.
IInterfaceDescriptorProvider::MarketSegments MarketSegments