OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
EmdsHandler.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 
32 
33 namespace OnixS
34 {
35  namespace Eurex
36  {
37  namespace MarketData
38  {
39  /// Eurex Extended Market Data Service Handler.
40  class ONIXS_EUREX_EMDI_API EmdsHandler
41  {
42  public:
43  /// Performs instance initialization.
44  /// @param settings defines values for various options
45  /// which affect handler behavior like enabling logging
46  /// during execution of the handler.
47  EmdsHandler (const EmdsHandlerSettings& settings);
48 
49  /// Finalizes the Handler.
50  virtual ~EmdsHandler();
51 
52  /// Assigns listener for errors occurred while executing handler.
53  /// It's permissible to change the listener multiple times during
54  /// handler's life-time, but only when handler is in disconnected state.
55  /// @throw OperationException if handler not disconnected
56  void registerErrorListener (ErrorListener* listener);
57 
58  /// Assigns listener for warnings occurred while executing handler.
59  /// It's permissible to change the listener multiple times during
60  /// handler's life-time, but only when handler is in disconnected state.
61  /// @throw OperationException if handler not disconnected
62  void registerWarningListener (WarningListener* listener);
63 
64  /// Assigns listener for state change events occurred while executing handler.
65  /// It's permissible to change the listener multiple times during
66  /// handler's life-time, but only when handler is in disconnected state.
67  /// @throw OperationException if handler not disconnected.
68  void registerHandlerStateListener (HandlerStateListener* listener);
69 
70  /// Assigns listener for settlement messages received while executing handler.
71  /// It's permissible to change the listener multiple times during
72  /// handler's life-time, but only when handler is in disconnected state.
73  /// @throw OperationException if handler not disconnected.
74  void registerSettlementListener (SettlementListener* listener);
75 
76  /// Assigns listener for open interest messages received while executing handler.
77  /// It's permissible to change the listener multiple times during
78  /// handler's life-time, but only when handler is in disconnected state.
79  /// @throw OperationException if handler not disconnected.
80  void registerOpenInterestListener (OpenInterestListener* listener);
81 
82  /// Assigns listener for On-exchange trade messages received while executing handler.
83  /// It's permissible to change the listener multiple times during
84  /// handler's life-time, but only when handler is in disconnected state.
85  /// @throw OperationException if handler not disconnected.
86  void registerExchangeTradeListener (ExchangeTradeListener* listener);
87 
88  /// Set the Market Segment Id filtering values.
89  ///
90  /// @note The filter is inclusive.
91  void setMarketSegmentIdFilters (const MarketSegmentIdFilters& filters);
92 
93  /// Remove all filters.
94  void removeAllMarketSegmentIdFilters();
95 
96  /// Set the Security Id filtering values.
97  ///
98  /// @note The filter is inclusive.
99  void setSecurityIdFilters (const SecurityIdFilters& filters);
100 
101  /// Remove all filters.
102  void removeAllSecurityIdFilters();
103 
104  /// Binds Feed Engine to the Handler.
105  ///
106  /// Handler must be in stopped state.
107  ///
108  /// @throw OperationException in case when handler is not in configurable state.
109  void bindFeedEngine(FeedEngine& feedEngine);
110 
111  /// Start handler.
112  ///
113  /// @note This action is asynchronous.
114  /// @throw std::exception in case of unable to start.
115  void start ();
116 
117  /// Starts replaying previously logged data.
118  void start (const ReplayOptions& options);
119 
120  /// Stop handler.
121  void stop ();
122 
123  /// Returns handler state.
124  HandlerState::Enum state () const;
125 
126  /// Logs the given user-level message to the handler log.
127  void log (LogLevel::Enum logLevel, const char* logMessage, size_t length);
128 
129  /// Logs the given user-level message to the handler log
130  void log (LogLevel::Enum logLevel, const char* logMessage);
131 
132  /// Logs the given user-level message to the handler log.
133  void log (LogLevel::Enum logLevel, const std::string& str);
134 
135  /// Returns the license expiration date.
136  const char* licenseExpirationDate () const;
137 
138  /// Returns Handler's version.
139  static const char* version ();
140 
141  private:
142  EmdsHandler (const EmdsHandler&); //no implementation
143  EmdsHandler& operator = (const EmdsHandler&); //no implementation
144 
145  private:
146  struct Impl;
147  Impl* impl_;
148  };
149 
150  }
151  }
152 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:287
EMDI handler configuration settings.
Definition: Defines.h:30
FilteringTraits::MarketSegmentIdFilters MarketSegmentIdFilters
Defines params which affect logs replay.
Definition: Replay.h:77
FilteringTraits::SecurityIdFilters SecurityIdFilters
Enum
Defines the state that the handler is in.
Eurex Extended Market Data Service Handler.
Definition: EmdsHandler.h:40