OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
EmdiHandlerManager.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  struct EmdiHandlerSettings;
34  class FeedEngine;
35  class ErrorListener;
36  class WarningListener;
37  class DepthListener;
38  class TopOfBookImpliedListener;
39  class ProductStateChangeListener;
40  class MassInstrumentStateChangeListener;
41  class InstrumentStateChangeListener;
42  class QuoteRequestListener;
43  class CrossRequestListener;
44  class ComplexInstrumentUpdateListener;
45  class FlexibleInstrumentUpdateListener;
46  class OrderBookListener;
47  class TradeListener;
48 
49  /// EMDI Handler Manager.
50  class ONIXS_EUREX_EMDI_API EmdiHandlerManager
51  {
52  public:
53  /// Performs instance initialization.
54  /// @param settings defines values for various options
55  /// which affect handler behavior like enabling logging
56  /// during execution of the handler.
57  EmdiHandlerManager (const EmdiHandlerSettings& settings);
58 
59  /// Finalizes the Handler.
60  virtual ~EmdiHandlerManager();
61 
62  /// Assigns listener for errors occurred while executing handler.
63  /// It's permissible to change the listener multiple times during
64  /// handler's life-time, but only when handler is in disconnected state.
65  /// @throw OperationException if handler not disconnected
66  void registerErrorListener (ErrorListener* listener);
67 
68  /// Assigns listener for warnings occurred while executing handler.
69  /// It's permissible to change the listener multiple times during
70  /// handler's life-time, but only when handler is in disconnected state.
71  /// @throw OperationException if handler not disconnected
72  void registerWarningListener (WarningListener* listener);
73 
74  /// Assigns listener for depth messages received while executing handler.
75  /// It's permissible to change the listener multiple times during
76  /// handler's life-time, but only when handler is in disconnected state.
77  /// @throw OperationException if handler not disconnected.
78  void registerDepthListener (DepthListener* listener);
79 
80  /// Assigns listener for Top Of Book Implied message received while executing handler.
81  /// It's permissible to change the listener multiple times during
82  /// handler's life-time, but only when handler is in disconnected state.
83  /// @throw OperationException if handler not disconnected.
84  void registerTopOfBookImpliedListener (TopOfBookImpliedListener* listener);
85 
86  /// Assigns listener for Product State Change message received while executing handler.
87  /// It's permissible to change the listener multiple times during
88  /// handler's life-time, but only when handler is in disconnected state.
89  /// @throw OperationException if handler not disconnected.
90  void registerProductStateChangeListener (ProductStateChangeListener* listener);
91 
92  /// Assigns listener for Mass Instrument State Change message received while executing handler.
93  /// It's permissible to change the listener multiple times during
94  /// handler's life-time, but only when handler is in disconnected state.
95  /// @throw OperationException if handler not disconnected.
96  void registerMassInstrumentStateChangeListener (MassInstrumentStateChangeListener* listener);
97 
98  /// Assigns listener for Instrument State Change message received while executing handler.
99  /// It's permissible to change the listener multiple times during
100  /// handler's life-time, but only when handler is in disconnected state.
101  /// @throw OperationException if handler not disconnected.
102  void registerInstrumentStateChangeListener (InstrumentStateChangeListener* listener);
103 
104  /// Assigns listener for Quote Request message received while executing handler.
105  /// It's permissible to change the listener multiple times during
106  /// handler's life-time, but only when handler is in disconnected state.
107  /// @throw OperationException if handler not disconnected.
108  void registerQuoteRequestListener (QuoteRequestListener* listener);
109 
110  /// Assigns listener for Cross Request message received while executing handler.
111  /// It's permissible to change the listener multiple times during
112  /// handler's life-time, but only when handler is in disconnected state.
113  /// @throw OperationException if handler not disconnected.
114  void registerCrossRequestListener (CrossRequestListener* listener);
115 
116  /// Assigns listener for Complex Instrument Update message received while executing handler.
117  /// It's permissible to change the listener multiple times during
118  /// handler's life-time, but only when handler is in disconnected state.
119  /// @throw OperationException if handler not disconnected.
120  void registerComplexInstrumentUpdateListener (ComplexInstrumentUpdateListener* listener);
121 
122  /// Assigns listener for Flexible Instrument Update message received while executing handler.
123  /// It's permissible to change the listener multiple times during
124  /// handler's life-time, but only when handler is in disconnected state.
125  /// @throw OperationException if handler not disconnected.
126  void registerFlexibleInstrumentUpdateListener (FlexibleInstrumentUpdateListener* listener);
127 
128  /// Assigns listener for Order Book updates received while executing handler.
129  /// It's permissible to change the listener multiple times during
130  /// handler's life-time, but only when handler is in disconnected state.
131  /// @throw OperationException if handler not disconnected.
132  void registerOrderBookListener (OrderBookListener* listener);
133 
134  /// Assigns listener for trades received while executing handler.
135  /// It's permissible to change the listener multiple times during
136  /// handler's life-time, but only when handler is in disconnected state.
137  /// @throw OperationException if handler not disconnected.
138  void registerTradeListener (TradeListener* listener);
139 
140  /// Start manager.
141  ///
142  /// @note This action is asynchronous.
143  /// @throw std::exception in case of unable to start all necessary EMDI handlers.
144  void start (const IInterfaceDescriptorProvider* provider, const MarketSegments& productNames, FeedEngine& feedEngine);
145 
146  /// Stop manager.
147  void stop ();
148 
149  private:
150  EmdiHandlerManager (const EmdiHandlerManager&); //no implementation
151  EmdiHandlerManager& operator = (const EmdiHandlerManager&); //no implementation
152 
153  private:
154  struct Impl;
155  Impl* impl_;
156 
157  ErrorListener* errorListener_;
158  WarningListener* warningListener_;
159  DepthListener* depthListener_;
160  TopOfBookImpliedListener* topOfBookImpliedListener_;
161  ProductStateChangeListener* productStateChangeListener_;
162  MassInstrumentStateChangeListener* massInstrumentStateChangeListener_;
163  InstrumentStateChangeListener* instrumentStateChangeListener_;
164  QuoteRequestListener* quoteRequestListener_;
165  CrossRequestListener* crossRequestListener_;
166  ComplexInstrumentUpdateListener* complexInstrumentUpdateListener_;
167  FlexibleInstrumentUpdateListener* flexibleInstrumentUpdateListener_;
168  OrderBookListener* orderBookListener_;
169  TradeListener* tradeListener_;
170  };
171 
172  }
173  }
174 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:287
Definition: Defines.h:30
EMDI handler configuration settings.
IInterfaceDescriptorProvider::MarketSegments MarketSegments