OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.0.3
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  EobiHandlerManager (const EobiHandlerSettings& settings);
61 
62  /// Finalizes the Handler.
63  virtual ~EobiHandlerManager();
64 
65  /// Assigns listener for errors occurred while executing handler.
66  /// It's permissible to change the listener multiple times during
67  /// handler's life-time, but only when handler is in disconnected state.
68  /// @throw OperationException if handler not disconnected
69  void registerErrorListener (ErrorListener* listener);
70 
71  /// Assigns listener for warnings occurred while executing handler.
72  /// It's permissible to change the listener multiple times during
73  /// handler's life-time, but only when handler is in disconnected state.
74  /// @throw OperationException if handler not disconnected
75  void registerWarningListener (WarningListener* listener);
76 
77  void registerHandlerStateListener (HandlerStateListener* listener);
78  void registerOrderDataListener (EOBI::OrderDataListener* listener);
79  void registerTradeDataListener (EOBI::TradeDataListener* listener);
80  void registerStateChangeListener (EOBI::StateChangeListener* listener);
81  void registerReferenceDataListener (EOBI::ReferenceDataListener* listener);
82  void registerSnapshotListener (EOBI::SnapshotListener* listener);
83  void registerMessageListener (EOBI::MessageListener* listener);
84  void registerOrderBookListener (EOBI::OrderBookListener* listener);
85  void registerPacketListener(PacketListener* listener);
86 
87 
88  /// Start manager.
89  ///
90  /// @note This action is asynchronous.
91  /// @throw std::exception in case of unable to start all necessary EMDI handlers.
92  void start (const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames, FeedEngine& feedEngine);
93 
94  /// Stop manager.
95  void stop ();
96 
97  private:
98  EobiHandlerManager (const EobiHandlerManager&); //no implementation
99  EobiHandlerManager& operator = (const EobiHandlerManager&); //no implementation
100 
101  private:
102  struct Impl;
103  Impl* impl_;
104  ErrorListener* errorListener_;
105  WarningListener* warningListener_;
106  HandlerStateListener* handlerStateListener_;
107  EOBI::OrderDataListener* orderDataListener_;
108  EOBI::TradeDataListener* tradeDataListener_;
109  EOBI::StateChangeListener* stateChangeListener_;
110  EOBI::ReferenceDataListener* referenceDataListener_;
111  EOBI::SnapshotListener* snapshotListener_;
112  EOBI::MessageListener* messageListener_;
113  EOBI::OrderBookListener* orderBookListener_;
114  PacketListener* packetListener_;
115  };
116  }
117  }
118  }
119 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:283
Definition: Group.h:25
Product State Change listener.
EOBI handler configuration settings.
IInterfaceDescriptorProvider::MarketSegments MarketSegments