OnixS C++ CME MDP Premium Market Data Handler 5.9.2
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 <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
135
139{
140public:
142 IssueArgs(Issue::Enum id, const std::string& source, const std::string& description)
143 : id_(id)
144 , source_(source)
145 , description_(description)
146 {
147 }
148
151 {
152 return id_;
153 }
154
156 const std::string& source() const
157 {
158 return source_;
159 }
160
162 const std::string& description() const
163 {
164 return description_;
165 }
166
167private:
168 Issue::Enum id_;
169 const std::string& source_;
170 const std::string& description_;
171
172 IssueArgs(const IssueArgs&);
173 IssueArgs& operator=(const IssueArgs&);
174};
175
178
181
183
186{
188 virtual void onStarted(Handler&) {}
189
191 virtual void onStopped(Handler&) {}
192
195
198
211 virtual void onMarketRecovery(Handler&) {}
212
222
224 virtual void onTcpRecovery(Handler&) {}
225
228
232
236
242 virtual void onWarning(Handler&, const WarningArgs&) {}
243
250 virtual void onError(Handler&, const ErrorArgs&) {}
251};
252
253inline std::ostream& operator<<(std::ostream& stream, const IssueArgs& args)
254{
255 return stream << args.description();
256}
257
#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:179
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.