OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  11.0.0
API documentation
RdiHandler.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 #pragma once
20 
25 
26 
27 namespace OnixS
28 {
29  namespace Eurex
30  {
31  namespace MarketData
32  {
33  ONIXS_EUREX_EMDI_API_DECL(class, FeedEngine);
34 
35  struct ReplayOptions;
36 
37  class ErrorListener;
38  class WarningListener;
39  class ReferenceDataListener;
40  class HanlerSettings;
41 
42  /// Eurex Reference Data Interface Handler.
43  class ONIXS_EUREX_EMDI_API RdiHandler : public IInterfaceDescriptorProvider
44  {
45  public:
46  /// Performs instance initialization.
47  /// @param settings defines values for various options
48  /// which affect handler behavior like enabling logging
49  /// during execution of the handler.
50  explicit RdiHandler (const RdiHandlerSettings& settings,
51  const std::string& = ONIXS_COMPILER_INFO);
52 
53  /// Finalizes the Handler.
54  ~RdiHandler() ONIXS_EUREX_EMDI_OVERRIDE;
55 
56  /// Assigns listener for errors occurred while executing handler.
57  /// It's permissible to change the listener multiple times during
58  /// handler's life-time, but only when handler is in disconnected state.
59  /// @throw OperationException if handler not disconnected
60  void registerErrorListener (ErrorListener* listener);
61 
62  /// Assigns listener for warnings 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 registerWarningListener (WarningListener* listener);
67 
68  /// Assigns listener for state change events 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 registerHandlerStateListener (HandlerStateListener* listener);
73 
74  /// Assigns listener for 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 registerReferenceDataListener (ReferenceDataListener* listener);
79 
80  /// Binds Feed Engine to the Handler.
81  ///
82  /// Handler must be in stopped state.
83  ///
84  /// @throw OperationException in case when handler is not in configurable state.
85  void bindFeedEngine(FeedEngine& feedEngine);
86 
87  /// Start handler.
88  ///
89  /// @note This action is asynchronous.
90  /// @throw std::exception in case of unable to start.
91  void start ();
92 
93  /// Starts replaying previously logged data.
94  void start (const ReplayOptions& options);
95 
96  /// Stop handler.
97  void stop ();
98 
99  /// Returns handler state.
100  HandlerState::Enum state () const;
101 
102  /// Returns list of EMDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
103  /// to receive market data for products specified by productNames.
104  EmdiDescriptors findEmdiDescriptors (const MarketSegments& productNames) const ONIXS_EUREX_EMDI_OVERRIDE;
105 
106  /// Returns list of EMDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
107  /// to receive market data for all products.
108  EmdiDescriptors findAllEmdiDescriptors () const ONIXS_EUREX_EMDI_OVERRIDE;
109 
110  /// Returns list of MDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
111  /// to receive market data for products specified by productNames.
112  MdiDescriptors findMdiDescriptors(const MarketSegments& productNames) const ONIXS_EUREX_EMDI_OVERRIDE;
113 
114  /// Returns list of MDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
115  /// to receive market data for all products.
116  MdiDescriptors findAllMdiDescriptors() const ONIXS_EUREX_EMDI_OVERRIDE;
117 
118  /// Returns list of EOBI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
119  /// to receive market data for products specified by productNames.
120  EobiDescriptors findEobiDescriptors (const MarketSegments& productNames) const ONIXS_EUREX_EMDI_OVERRIDE;
121 
122  /// Returns list of EOBI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
123  /// to receive market data for all products.
124  EobiDescriptors findAllEobiDescriptors () const ONIXS_EUREX_EMDI_OVERRIDE;
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  RdiHandler (const RdiHandler&); //no implementation
143  RdiHandler& operator = (const RdiHandler&); //no implementation
144 
145  private:
146  struct Impl;
147  Impl* impl_;
148  };
149 
150  }
151  }
152 }
153 
154 
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:337
EobiDescriptor::Collection EobiDescriptors
Eurex Reference Data Interface Handler.
Definition: RdiHandler.h:43
Definition: Defines.h:30
Defines params which affect logs replay.
Definition: Replay.h:77
ONIXS_EUREX_EMDI_API_DECL(class, Message)
RDI handler configuration settings.
EmdiDescriptor::Collection EmdiDescriptors
MdiDescriptor::Collection MdiDescriptors
Enum
Defines the state that the handler is in.