OnixS C++ CME MDP Premium Market Data Handler 5.9.0
API Documentation
Loading...
Searching...
No Matches
HandlerListener.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
26
28
48
51{
52public:
55
57 RecoveryCompletionArgs(RecoveryCompletionStatus::Enum status, const std::string& message = std::string())
58 : status_(status)
59 , message_(message)
60 {
61 }
62
65 {
66 return status_;
67 }
68
71 const std::string& details() const
72 {
73 return message_;
74 }
75
78 void details(const std::string& message)
79 {
80 message_ = message;
81 }
82
83private:
85 std::string message_;
86};
87
132
136{
137public:
139 IssueArgs(Issue::Enum id, const std::string& source, const std::string& description)
140 : id_(id)
141 , source_(source)
142 , description_(description)
143 {
144 }
145
148 {
149 return id_;
150 }
151
153 const std::string& source() const
154 {
155 return source_;
156 }
157
159 const std::string& description() const
160 {
161 return description_;
162 }
163
164private:
165 Issue::Enum id_;
166 const std::string& source_;
167 const std::string& description_;
168
169 IssueArgs(const IssueArgs&);
170 IssueArgs& operator=(const IssueArgs&);
171};
172
175
178
180
183{
185 virtual void onStarted(Handler&) {}
186
188 virtual void onStopped(Handler&) {}
189
192
195
208 virtual void onMarketRecovery(Handler&) {}
209
219
221 virtual void onTcpRecovery(Handler&) {}
222
225
229
233
239 virtual void onWarning(Handler&, const WarningArgs&) {}
240
247 virtual void onError(Handler&, const ErrorArgs&) {}
248};
249
250inline std::ostream& operator<<(std::ostream& stream, const IssueArgs& args)
251{
252 return stream << args.description();
253}
254
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition Bootstrap.h:35
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
Encapsulates all the machinery related with market data processing from CME Market Data Platform.
Definition Handler.h:56
Gathers information about the issue Handler may experience while processing market data.
Issue::Enum id() const
Issue identifier.
IssueArgs(Issue::Enum id, const std::string &source, const std::string &description)
Initializes issue with provided attributes.
const std::string & source() const
Source of the issue.
const std::string & description() const
Human readable description of the issue.
Gathers information about the recovery completion.
RecoveryCompletionArgs(RecoveryCompletionStatus::Enum status, const std::string &message=std::string())
Initializes with given details.
const std::string & details() const
Human readable description of recovery completion.
void details(const std::string &message)
Associates human readable message with recover completion event.
RecoveryCompletionArgs()
Initializes as blank instance.
RecoveryCompletionStatus::Enum status() const
Indicates completion status of the recovery.
IssueArgs ErrorArgs
Error arguments.
IssueArgs WarningArgs
Warning arguments.
std::ostream & operator<<(std::ostream &stream, const IssueArgs &args)
Events raised by Handler while processing market data.
virtual void onStopped(Handler &)
Invoked when Handler has stopped market data processing.
virtual void onStarted(Handler &)
Handler is has started to process market data.
virtual void onEndOfInstrumentRecovery(Handler &, const RecoveryCompletionArgs &)
Download or replay of Security Definition(d) messages is finished.
virtual void onError(Handler &, const ErrorArgs &)
Error occurred while Handler is processing market data.
virtual void onTcpRecovery(Handler &)
Handler spawned recovery of lost packets over TCP feed.
virtual void onEndOfTcpRecovery(Handler &, const RecoveryCompletionArgs &)
Handler accomplished recovery of lost packets over TCP feed.
virtual void onMarketRecovery(Handler &)
Handler started recovering order books from snapshots.
virtual void onInstrumentRecovery(Handler &)
Download or replay of Security Definition(d) messages is started.
virtual void onEndOfRealtimeProcessing(Handler &)
Handler suspended real-time processing of market data received over incremental feeds.
virtual void onWarning(Handler &, const WarningArgs &)
Non-critical issue occurred while Handler is processing market data.
virtual void onEndOfMarketRecovery(Handler &, const RecoveryCompletionArgs &)
Handler accomplished recovering order books from snapshots.
virtual void onRealtimeProcessing(Handler &)
Handler resumed real-time processing of market data received over incremental feeds.
Collection of issues Handler may report during market data processing.
@ ConnectionFailure
Identifies network connection failure.
@ ProcessingFailure
Indicates data processing failure.
@ ReceiveTimeout
Indicates data receive timeout.
@ ReducedCapacity
Source reported this issue will function in reduced capacity.
@ QueueOverflow
Indicates internal queue overflow.
@ OperationFailure
Operation performed by the Handler failed.
@ ReplayFailure
Market data replay failed.
@ OperationTimeout
Operation performed by the Handler did not accomplish within the time allocated for it.
@ ReceiveFailure
Indicates data reception failure.
@ SequenceError
Indicates error in data sequence.
Collection of statuses of recovery completion.
@ Failed
Recovery failed and no further attempts to recover will be made.
@ Incomplete
Identifies incomplete recovery.
@ Succeeded
Recovery accomplished successfully.