OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  12.1.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 
27 
28 namespace OnixS
29 {
30  namespace Eurex
31  {
32  namespace MarketData
33  {
34  class ErrorListener;
35  class WarningListener;
36  class ReplayListener;
37  class HandlerStateListener;
38  class PacketListener;
39  class FeedEngine;
40 
41  namespace EOBI
42  {
43  struct EobiHandlerSettings;
44  class EobiHandler;
45  class OrderDataListener;
46  class TradeDataListener;
47  class StateChangeListener;
48  class ReferenceDataListener;
49  class SnapshotListener;
50  class MessageListener;
51  class OrderBookListener;
52 
53  /// EOBI Handler Manager.
54  class ONIXS_EUREX_EMDI_API EobiHandlerManager
55  {
56  public:
57  /// Performs instance initialization.
58  /// @param settings defines values for various options
59  /// which affect handler behavior like enabling logging
60  /// during execution of the handler.
61  explicit EobiHandlerManager (const EobiHandlerSettings& settings,
62  const std::string& = ONIXS_COMPILER_INFO);
63 
64  /// Finalizes the Handler.
65  virtual ~EobiHandlerManager();
66 
67  /// Assigns listener for errors occurred while executing handler.
68  /// It's permissible to change the listener multiple times during
69  /// handler's life-time, but only when handler is in disconnected state.
70  /// @throw OperationException if handler not disconnected
71  void registerErrorListener (ErrorListener* listener);
72 
73  /// Assigns listener for warnings occurred while executing handler.
74  /// It's permissible to change the listener multiple times during
75  /// handler's life-time, but only when handler is in disconnected state.
76  /// @throw OperationException if handler not disconnected
77  void registerWarningListener (WarningListener* listener);
78 
79  void registerHandlerStateListener (HandlerStateListener* listener);
80  void registerOrderDataListener (EOBI::OrderDataListener* listener);
81  void registerTradeDataListener (EOBI::TradeDataListener* listener);
82  void registerStateChangeListener (EOBI::StateChangeListener* listener);
83  void registerReferenceDataListener (EOBI::ReferenceDataListener* listener);
84  void registerSnapshotListener (EOBI::SnapshotListener* listener);
85  void registerMessageListener (EOBI::MessageListener* listener);
86  void registerOrderBookListener (EOBI::OrderBookListener* listener);
87  void registerPacketListener(PacketListener* listener);
88 
89 
90  /// Start manager.
91  ///
92  /// @note This action is asynchronous.
93  /// @throw std::exception in case of unable to start all necessary EMDI handlers.
94  void start (const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames, FeedEngine& feedEngine);
95 
96  /// Stop manager.
97  void stop ();
98 
99  /// Replay pcap files.
100  void replayPcap (const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames, const ReplayOptions& options);
101 
102  private:
103  EobiHandlerManager (const EobiHandlerManager&); //no implementation
104  EobiHandlerManager& operator = (const EobiHandlerManager&); //no implementation
105 
106  void prepareHandlers(const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames);
107 
108  private:
109  struct Impl;
110  Impl* impl_;
111  ErrorListener* errorListener_;
112  WarningListener* warningListener_;
113  HandlerStateListener* handlerStateListener_;
114  EOBI::OrderDataListener* orderDataListener_;
115  EOBI::TradeDataListener* tradeDataListener_;
116  EOBI::StateChangeListener* stateChangeListener_;
117  EOBI::ReferenceDataListener* referenceDataListener_;
118  EOBI::SnapshotListener* snapshotListener_;
119  EOBI::MessageListener* messageListener_;
120  EOBI::OrderBookListener* orderBookListener_;
121  PacketListener* packetListener_;
122  };
123  }
124  }
125  }
126 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:337
Definition: Defines.h:30
Product State Change listener.
Defines params which affect replay.
Definition: Replay.h:82
EOBI handler configuration settings.
ONIXS_EUREX_EMDI_API void replayPcap(const std::vector< EobiHandler * > &handlers, const ReplayOptions &options)
Replay pcap files.
IInterfaceDescriptorProvider::MarketSegments MarketSegments