OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.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  RdiHandler (const RdiHandlerSettings& settings);
51 
52  /// Finalizes the Handler.
53  virtual ~RdiHandler();
54 
55  /// Assigns listener for errors occurred while executing handler.
56  /// It's permissible to change the listener multiple times during
57  /// handler's life-time, but only when handler is in disconnected state.
58  /// @throw OperationException if handler not disconnected
59  void registerErrorListener (ErrorListener* listener);
60 
61  /// Assigns listener for warnings occurred while executing handler.
62  /// It's permissible to change the listener multiple times during
63  /// handler's life-time, but only when handler is in disconnected state.
64  /// @throw OperationException if handler not disconnected
65  void registerWarningListener (WarningListener* listener);
66 
67  /// Assigns listener for state change events occurred while executing handler.
68  /// It's permissible to change the listener multiple times during
69  /// handler's life-time, but only when handler is in disconnected state.
70  /// @throw OperationException if handler not disconnected.
71  void registerHandlerStateListener (HandlerStateListener* listener);
72 
73  /// Assigns listener for messages received while executing handler.
74  /// It's permissible to change the listener multiple times during
75  /// handler's life-time, but only when handler is in disconnected state.
76  /// @throw OperationException if handler not disconnected.
77  void registerReferenceDataListener (ReferenceDataListener* listener);
78 
79  /// Binds Feed Engine to the Handler.
80  ///
81  /// Handler must be in stopped state.
82  ///
83  /// @throw OperationException in case when handler is not in configurable state.
84  void bindFeedEngine(FeedEngine& feedEngine);
85 
86  /// Start handler.
87  ///
88  /// @note This action is asynchronous.
89  /// @throw std::exception in case of unable to start.
90  void start ();
91 
92  /// Starts replaying previously logged data.
93  void start (const ReplayOptions& options);
94 
95  /// Stop handler.
96  void stop ();
97 
98  /// Returns handler state.
99  HandlerState::Enum state () const;
100 
101  /// Returns list of EMDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
102  /// to receive market data for products specified by productNames.
103  EmdiDescriptors findEmdiDescriptors (const MarketSegments& productNames) const;
104 
105  /// Returns list of EMDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
106  /// to receive market data for all products.
107  EmdiDescriptors findAllEmdiDescriptors () const;
108 
109  /// Returns list of MDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
110  /// to receive market data for products specified by productNames.
111  MdiDescriptors findMdiDescriptors(const MarketSegments& productNames) const;
112 
113  /// Returns list of MDI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
114  /// to receive market data for all products.
115  MdiDescriptors findAllMdiDescriptors() const;
116 
117  /// Returns list of EOBI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
118  /// to receive market data for products specified by productNames.
119  EobiDescriptors findEobiDescriptors (const MarketSegments& productNames) const;
120 
121  /// Returns list of EOBI descriptors with filled partitionIdFilters and marketSegmentIdFilters to allow user
122  /// to receive market data for all products.
123  EobiDescriptors findAllEobiDescriptors () const;
124 
125  /// Logs the given user-level message to the handler log.
126  void log (LogLevel::Enum logLevel, const char* logMessage, size_t length);
127 
128  /// Logs the given user-level message to the handler log
129  void log (LogLevel::Enum logLevel, const char* logMessage);
130 
131  /// Logs the given user-level message to the handler log.
132  void log (LogLevel::Enum logLevel, const std::string& str);
133 
134  /// Returns the license expiration date.
135  const char* licenseExpirationDate () const;
136 
137  /// Returns Handler's version.
138  static const char* version ();
139 
140  private:
141  RdiHandler (const RdiHandler&); //no implementation
142  RdiHandler& operator = (const RdiHandler&); //no implementation
143 
144  private:
145  struct Impl;
146  Impl* impl_;
147  };
148 
149  }
150  }
151 }
152 
153 
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:287
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.