OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  11.0.0
API documentation
EobiHandler.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 
25 
26 namespace OnixS
27 {
28  namespace Eurex
29  {
30  namespace MarketData
31  {
32  ONIXS_EUREX_EMDI_API_DECL(class, FeedEngine);
33 
34  struct ReplayOptions;
35  class HandlerStateListener;
36  class WarningListener;
37  class ErrorListener;
38  class PacketListener;
39 
40  namespace EOBI
41  {
42  struct EobiHandlerSettings;
43 
44  class OrderDataListener;
45  class TradeDataListener;
46  class StateChangeListener;
47  class ReferenceDataListener;
48  class SnapshotListener;
49  class MessageListener;
50  class OrderBookListener;
51 
52  /// Eurex Enhanced Order Book Interface Handler.
53  class ONIXS_EUREX_EMDI_API EobiHandler
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  explicit EobiHandler (const EobiHandlerSettings& settings,
61  const std::string& = ONIXS_COMPILER_INFO);
62 
63  /// Finalizes the Handler.
64  virtual ~EobiHandler();
65 
66  /// Assigns listener for errors occurred while executing handler.
67  /// It's permissible to change the listener multiple times during
68  /// handler's life-time, but only when handler is in disconnected state.
69  /// @throw OperationException if handler not disconnected
70  void registerErrorListener (ErrorListener* listener);
71 
72  /// Assigns listener for warnings occurred while executing handler.
73  /// It's permissible to change the listener multiple times during
74  /// handler's life-time, but only when handler is in disconnected state.
75  /// @throw OperationException if handler not disconnected
76  void registerWarningListener (WarningListener* listener);
77 
78  /// Assigns listener for state change events occurred while executing handler.
79  /// It's permissible to change the listener multiple times during
80  /// handler's life-time, but only when handler is in disconnected state.
81  /// @throw OperationException if handler not disconnected.
82  void registerHandlerStateListener (HandlerStateListener* listener);
83 
84  void registerOrderDataListener (OrderDataListener* listener);
85  void registerTradeDataListener (TradeDataListener* listener);
86  void registerStateChangeListener (StateChangeListener* listener);
87  void registerReferenceDataListener (ReferenceDataListener* listener);
88  void registerSnapshotListener (SnapshotListener* listener);
89  void registerMessageListener (MessageListener* listener);
90  void registerOrderBookListener (OrderBookListener* listener);
91  void registerPacketListener (PacketListener* listener);
92 
93  /// Set the Partition Id filtering values.
94  ///
95  /// @note The filter is inclusive.
96  void setPartitionIdFilters (const PartitionIdFilters& filters);
97 
98  /// Remove all filters.
99  void removeAllPartitionIdFilters();
100 
101  /// Set the Market Segment Id filtering values.
102  ///
103  /// @note The filter is inclusive.
104  void setMarketSegmentIdFilters (const MarketSegmentIdFilters& filters);
105 
106  /// Remove all filters.
107  void removeAllMarketSegmentIdFilters();
108 
109  /// Set the Security Id filtering values.
110  ///
111  /// @note The filter is inclusive.
112  void setSecurityIdFilters (const SecurityIdFilters& filters);
113 
114  /// Remove all filters.
115  void removeAllSecurityIdFilters();
116 
117  /// Binds Feed Engine to the Handler.
118  ///
119  /// Handler must be in stopped state.
120  ///
121  /// @throw OperationException in case when handler is not in configurable state.
122  void bindFeedEngine(FeedEngine& feedEngine);
123 
124  /// Start handler.
125  ///
126  /// @note This action is asynchronous.
127  /// @throw std::exception in case of unable to start.
128  void start ();
129 
130  /// Starts replaying previously logged data.
131  void start (const ReplayOptions& options);
132 
133  /// Stop handler.
134  void stop ();
135 
136  /// Returns handler state.
137  HandlerState::Enum state () const;
138 
139  /// Logs the given user-level message to the handler log.
140  void log (LogLevel::Enum logLevel, const char* logMessage, size_t length);
141 
142  /// Logs the given user-level message to the handler log
143  void log (LogLevel::Enum logLevel, const char* logMessage);
144 
145  /// Logs the given user-level message to the handler log.
146  void log (LogLevel::Enum logLevel, const std::string& str);
147 
148  /// Returns the license expiration date.
149  const char* licenseExpirationDate () const;
150 
151  /// Returns Handler's version.
152  static const char* version ();
153 
154  private:
155  EobiHandler (const EobiHandler&); //no implementation
156  EobiHandler& operator = (const EobiHandler&); //no implementation
157 
158  private:
159  struct Impl;
160  Impl* impl_;
161  };
162  }
163  }
164  }
165 }
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:337
FilteringTraits::PartitionIdFilters PartitionIdFilters
Definition: Defines.h:30
Product State Change listener.
FilteringTraits::MarketSegmentIdFilters MarketSegmentIdFilters
Defines params which affect logs replay.
Definition: Replay.h:77
ONIXS_EUREX_EMDI_API_DECL(class, Message)
EOBI handler configuration settings.
FilteringTraits::SecurityIdFilters SecurityIdFilters
Enum
Defines the state that the handler is in.
Eurex Enhanced Order Book Interface Handler.
Definition: EobiHandler.h:53