OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
SessionConnectionSettings.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#pragma once
21
22#include <string>
23#include <vector>
24
26
27namespace OnixS {
28namespace FIX {
29namespace Scheduling {
31typedef std::string Host;
32
34typedef unsigned Port;
35
39{
40public:
43
46
48 Counterparty(const Counterparty & other);
49
52
54 const Host & host() const;
55
57 Port port() const;
58
60 Counterparty & operator = (const Counterparty & other);
61
62private:
63 Host * host_;
64 Port port_;
65};
66
67
69typedef std::vector<Counterparty> Counterparties;
70
71
74{
75public:
78 const SessionConnectionSettings & other);
79
82
85 SessionRole::Enum role() const;
86
90 unsigned heartBeatInterval() const;
91
95 bool setResetSequenceNumbers() const;
96
100 Message * logonMessage() const;
101
104 const Counterparties & counterparties() const;
105
108 operator = (const SessionConnectionSettings & other);
109
110protected:
113
115 void heartBeatInterval(unsigned interval);
116
118 void setResetSequenceNumbers(bool resetSeqNumbers);
119
121 void logonMessage(const Message & message);
122
125
126private:
127 SessionRole::Enum role_;
128
129 unsigned heartBeatInterval_;
130
131 bool resetSeqNumbers_;
132
133 Message * logonMessage_;
134
135 Counterparties * counterparties_;
136};
137
138inline
141{
142 return role_;
143}
144
145inline
146unsigned
148{
149 return heartBeatInterval_;
150}
151
152inline
153bool
155{
156 return resetSeqNumbers_;
157}
158
159inline
160Message *
162{
163 return logonMessage_;
164}
165
166inline
167const Counterparties &
169{
170 return *counterparties_;
171}
172
183
185class
189{
190public:
195 const Host & host, Port port);
196
203 const Host & host, Port port,
204 bool resetSessionSequenceNumbers);
205
212 const Host & host, Port port,
213 unsigned heartbeatInterval);
214
221 const Host & host, Port port,
222 const Message & customLogonMessage);
223
233 const Host & host,
234 Port port,
235 unsigned heartbeatInterval,
236 bool resetSessionSequenceNumbers,
237 const Message * customLogonMessage = ONIXS_FIXENGINE_NULLPTR);
238
240 void addCounterparty(const Host & host, Port port);
241};
242}
243}
244}
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
#define ONIXS_FIXENGINE_NULLPTR
Definition Compiler.h:200
Encapsulates operations over a FIX Message.
Definition Message.h:52
AcceptorConnectionSettings()
Initializes settings for sessions-acceptors.
Counterparty()
Initializes the blank instance.
const Host & host() const
Defines the remote host to which the session must connect to.
Counterparty(const Host &host, Port port)
Identifies a counterparty.
Port port() const
Defines the port number to which the session must connect to.
Counterparty(const Counterparty &other)
Initializes as a clone of another instance.
~Counterparty()
Cleans everything up.
InitiatorConnectionSettings(const Host &host, Port port, unsigned heartbeatInterval, bool resetSessionSequenceNumbers, const Message *customLogonMessage=ONIXS_FIXENGINE_NULLPTR)
Initializes an instance with session-initiator related attributes.
InitiatorConnectionSettings(const Host &host, Port port)
Initializes an instance with session-initiator related attributes.
InitiatorConnectionSettings(const Host &host, Port port, const Message &customLogonMessage)
Initializes an instance with session-initiator related attributes.
InitiatorConnectionSettings(const Host &host, Port port, unsigned heartbeatInterval)
Initializes an instance with session-initiator related attributes.
void addCounterparty(const Host &host, Port port)
Adds one more counterparty for the list of counterparties session should try to connect to.
InitiatorConnectionSettings(const Host &host, Port port, bool resetSessionSequenceNumbers)
Initializes an instance with session-initiator related attributes.
const Counterparties & counterparties() const
The list of all counterparties.
SessionConnectionSettings(SessionRole::Enum role)
Initializes an instance with the given session role.
virtual ~SessionConnectionSettings()
Cleans an instance up.
void setResetSequenceNumbers(bool resetSeqNumbers)
Updates the session reset sequence numbers policy.
void logonMessage(const Message &message)
Assigns the custom logon message.
Counterparties & counterparties()
The editable collection of counterparties.
SessionConnectionSettings(const SessionConnectionSettings &other)
Initializes an instance from another one.
Message * logonMessage() const
If the session must be logged on in the role of an initiator, defines the custom logon message which ...
void heartBeatInterval(unsigned interval)
Updates the heartbeat interval value.
bool setResetSequenceNumbers() const
If the session must be logged on in the role of an initiator, defines whether the 'SetResetSequenceNu...
SessionRole::Enum role() const
Specifies whether the session must be connected as an acceptor or initiator.
unsigned heartBeatInterval() const
If the session must be logged on in the role of an initiator, defines the value for the heartbeat int...
std::string Host
The counterparty host name.
std::vector< Counterparty > Counterparties
The ordered series of counterparties.
unsigned Port
The counterparty socket port.