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