OnixS C++ CME MDP Streamlined Market Data Handler 1.2.0
API Documentation
Loading...
Searching...
No Matches
TcpRecovery.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
32{
33public:
36 : username_()
37 , password_()
38 , reconnectAttempts_(3)
39 , reconnectInterval_(500)
40 , servingTimeout_(10)
41 , acquisitionTimeout_(500)
42 {
43 }
44
49
52 const std::string& username() const
53 {
54 return username_;
55 }
56
59 void
61 const std::string& username)
62 {
63 username_ = username;
64 }
65
68 const std::string& password() const
69 {
70 return password_;
71 }
72
75 void
77 const std::string& password)
78 {
79 password_ = password;
80 }
81
87 {
88 return reconnectAttempts_;
89 }
90
93 void
96 {
97 reconnectAttempts_ =
99 }
100
109 {
110 return reconnectInterval_;
111 }
112
118 void
121 {
122 reconnectInterval_ =
124 }
125
135 {
136 return servingTimeout_;
137 }
138
145 void
148 {
149 servingTimeout_ =
151 }
152
165 {
166 return acquisitionTimeout_;
167 }
168
176 void
179 {
180 acquisitionTimeout_ =
182 }
183
184
185private:
186 std::string username_;
187 std::string password_;
188
189 UInt32 reconnectAttempts_;
190 UInt32 reconnectInterval_;
191
192 UInt32 servingTimeout_;
193 UInt32 acquisitionTimeout_;
194};
195
198void
200 std::string&,
201 const
203
205inline
206std::string
208 const
209 TcpRecoverySettings& settings)
210{
211 std::string str;
212
213 toStr(str, settings);
214
215 return str;
216}
217
219(
220 TcpRecoverySession
221);
222
226{
227public:
230 const TcpRecoverySettings&);
231
234
236 const
238 settings() const
239 {
240 return *settings_;
241 }
242
243private:
244 friend
246 (
247 TcpRecoverySession
248 );
249
250 // Shared details.
251 void* resource_;
252
253 // Settings of the service.
254 TcpRecoverySettings* settings_;
255
256 // Copying is not assumed.
257
259 const TcpRecoveryService&);
260
262 operator =(
263 const TcpRecoveryService&);
264};
265
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED_CLASS
Definition Bootstrap.h:63
#define ONIXS_CMESTREAMLINEDMDH_INTERNAL_CLASS_DECL(typeName)
Definition Bootstrap.h:71
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:169
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition Bootstrap.h:111
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition Compiler.h:160
const TcpRecoverySettings & settings() const
Settings defining service behavior.
TcpRecoveryService(const TcpRecoverySettings &)
Initializes instance according to given settings.
~TcpRecoveryService()
Finalizes instance and cleans everything up.
TCP recovery service configuration settings.
Definition TcpRecovery.h:32
void username(const std::string &username)
Assigns username to identify a requester while logging on to a TCP Recovery service.
Definition TcpRecovery.h:60
void servingTimeout(UInt32 servingTimeout)
Amount of time allocated to process a recovery request.
const std::string & username() const
Username to identify a requester while logging on to a TCP Recovery service.
Definition TcpRecovery.h:52
void reconnectInterval(UInt32 reconnectInterval)
Interval between the attempts to receive missed packets via the TCP recovery feed if previous attempt...
UInt32 reconnectInterval() const
Interval between the attempts to receive missed packets via the TCP recovery feed if previous attempt...
UInt32 reconnectAttempts() const
Number of attempts to receive missed messages via the TCP recovery feed.
Definition TcpRecovery.h:86
TcpRecoverySettings()
Initializes parameters with default values.
Definition TcpRecovery.h:35
void reconnectAttempts(UInt32 reconnectAttempts)
Number of attempts to receive missed messages via the TCP recovery feed.
Definition TcpRecovery.h:94
UInt32 acquisitionTimeout() const
Timeout on a TCP recovery service acquisition.
UInt32 servingTimeout() const
Amount of time allocated to process a recovery request.
void password(const std::string &password)
Assigns password to identify a requester while logging on to TCP Recovery service.
Definition TcpRecovery.h:76
const std::string & password() const
Password to identify a requester while logging on to TCP Recovery service.
Definition TcpRecovery.h:68
void acquisitionTimeout(UInt32 acquisitionTimeout)
Timeout of request for shared TCP recovery service.
void toStr(std::string &str, const Decimal &number)
Definition Decimal.h:502