OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
Handler.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
23#include <string>
24#include <memory>
25
28
30
31ONIXS_CMEMDH_LTWT_CLASS_DECL(HandlerSettings);
32ONIXS_CMEMDH_LTWT_CLASS_DECL(MemoryPoolSettings);
33ONIXS_CMEMDH_LTWT_CLASS_DECL(InstrumentSelection);
34
35#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
36
38ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(ChannelFeedListener);
39
40ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(MarketDataListener);
41ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(SecurityListener);
42
45ONIXS_CMEMDH_EXPORTED_CLASS_DECL(TcpRecoveryService);
46
47ONIXS_CMEMDH_LTWT_CLASS_DECL(SessionSettings);
48
49#endif // ONIXS_CMEMDH_NO_DEPRECATED
50
52
56{
57public:
60
63 explicit Handler(const MemoryPoolSettings&, std::string = ONIXS_CMEMDH_COMPILER_INFO);
64
66 explicit Handler(const HandlerSettings&, std::string = ONIXS_CMEMDH_COMPILER_INFO);
67
70
73
75 const HandlerSettings& settings() const;
76
77#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
78
85 Logger& logger();
86
87#endif // ONIXS_CMEMDH_NO_DEPRECATED
88
98
102
103#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
104
123 void registerListener(HandlerListener& listener);
124
143 void registerFeedListener(ChannelFeedListener& listener);
144
163 void registerMarketDataListener(MarketDataListener& listener);
164
183 void registerSecurityListener(SecurityListener& listener);
184
196 void bindFeedEngine(NetFeedEngine& feedEngine);
197
209 void bindTcpRecovery(TcpRecoveryService& tcpRecovery);
210
222 void bindLogger(Logger& logger);
223
224#endif // ONIXS_CMEMDH_NO_DEPRECATED
225
236 void start();
237
238#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
239
251 void start(const SessionSettings& settings);
252
253#endif // ONIXS_CMEMDH_NO_DEPRECATED
254
260 void stop();
261
263 std::string licenseExpirationDate() const;
264
265private:
267
268 // Data processing workhorse.
269 ChannelModel* model_;
270
271 // Coping is not allowed for the instances.
272
273 Handler(const Handler&);
274 Handler& operator=(const Handler&);
275};
276
#define ONIXS_CMEMDH_INTERNAL_CLASS_DECL(typeName)
Definition Bootstrap.h:52
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:69
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
Definition Bootstrap.h:63
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition Bootstrap.h:50
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:73
#define ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(typeName)
Definition Bootstrap.h:51
#define ONIXS_CMEMDH_COMPILER_INFO
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:163
Handler's configuration settings.
Handler(const MemoryPoolSettings &, std::string=(""))
Handler(std::string=(""))
Initializes the instance with the default settings.
friend class PcapReplayHelper
Definition Handler.h:266
Handler(const HandlerSettings &, std::string=(""))
Initializes the instance according to the given settings.
void start()
Starts market data processing if the handler is stopped.
std::string licenseExpirationDate() const
Returns the license expiration date.
const HandlerSettings & settings() const
Immutable configuration of the given instance.
void stop()
Stops a processing handler; has no effect when already stopped.
~Handler()
Finalizes the instance.
void selectInstruments(const InstrumentSelection &)
HandlerSettings & settings()
The configuration parameters of the given instance.
Defines the interface for creating and submitting log entries.
Definition Logger.h:198
Configures allocation and caching behavior of the handler's memory pool.
Receives network feed events raised by a single Handler instance.
Events raised by Handler while processing market data.
Callbacks invoked by Handler to expose market data entities.