OnixS C++ CME MDP Premium Market Data Handler 5.10.3
Users' manual and 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 <ostream>
24#include <string>
25
27
29
49
52{
53public:
56
58 RecoveryCompletionArgs(RecoveryCompletionStatus::Enum status, const std::string& message = std::string())
59 : status_(status)
60 , message_(message)
61 {
62 }
63
66 {
67 return status_;
68 }
69
72 const std::string& details() const
73 {
74 return message_;
75 }
76
79 void details(const std::string& message)
80 {
81 message_ = message;
82 }
83
84private:
86 std::string message_;
87};
88
136
140{
141public:
143 IssueArgs(Issue::Enum id, const std::string& source, const std::string& description)
144 : id_(id)
145 , source_(source)
146 , description_(description)
147 {
148 }
149
152 {
153 return id_;
154 }
155
157 const std::string& source() const
158 {
159 return source_;
160 }
161
163 const std::string& description() const
164 {
165 return description_;
166 }
167
168private:
169 Issue::Enum id_;
170 const std::string& source_;
171 const std::string& description_;
172
173 IssueArgs(const IssueArgs&);
174 IssueArgs& operator=(const IssueArgs&);
175};
176
179
182
184
187{
189 virtual void onStarted(Handler&) {}
190
192 virtual void onStopped(Handler&) {}
193
196
199
212 virtual void onMarketRecovery(Handler&) {}
213
223
225 virtual void onTcpRecovery(Handler&) {}
226
229
233
237
243 virtual void onWarning(Handler&, const WarningArgs&) {}
244
251 virtual void onError(Handler&, const ErrorArgs&) {}
252};
253
254inline std::ostream& operator<<(std::ostream& stream, const IssueArgs& args)
255{
256 return stream << args.description();
257}
258
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:54
#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:55
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:148
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
void details(const std::string &message)
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 &)
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 &)
virtual void onInstrumentRecovery(Handler &)
Download or replay of Security Definition(d) messages is started.
virtual void onEndOfRealtimeProcessing(Handler &)
virtual void onWarning(Handler &, const WarningArgs &)
virtual void onEndOfMarketRecovery(Handler &, const RecoveryCompletionArgs &)
virtual void onRealtimeProcessing(Handler &)
@ ConnectionFailure
Identifies network connection failure.
@ ProcessingFailure
Indicates data processing failure.
@ ReceiveTimeout
Indicates data receive timeout.
@ QueueOverflow
Indicates internal queue overflow.
@ UserException
Unhandled exception inside user callback.
@ OperationFailure
Operation performed by the Handler failed.
@ ReplayFailure
Market data replay failed.
@ ReceiveFailure
Indicates data reception failure.
@ SequenceError
Indicates error in data sequence.
Collection of statuses of recovery completion.
@ Succeeded
Recovery accomplished successfully.