Session.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /****************************************************************************
4 ** Copyright (c) 2001-2014
5 **
6 ** This file is part of the QuickFIX FIX Engine
7 **
8 ** This file may be distributed under the terms of the quickfixengine.org
9 ** license as defined by quickfixengine.org and appearing in the file
10 ** LICENSE included in the packaging of this file.
11 **
12 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 **
15 ** See http://www.quickfixengine.org/LICENSE for licensing information.
16 **
17 ** Contact ask@quickfixengine.org if any conditions of this licensing are
18 ** not clear to you.
19 **
20 ****************************************************************************/
21 
22 #ifndef FIX_SESSION_H
23 #define FIX_SESSION_H
24 
25 #ifdef _MSC_VER
26 #pragma warning( disable : 4503 4355 4786 4290 )
27 #endif
28 
29 #include "SessionState.h"
30 #include "TimeRange.h"
31 #include "SessionID.h"
32 #include "Responder.h"
33 #include "Fields.h"
34 #include "DataDictionaryProvider.h"
35 #include "Application.h"
36 #include "Mutex.h"
37 #include "Log.h"
38 #include <utility>
39 #include <map>
40 #include <queue>
41 
42 namespace FIX
43 {
45 class Session
46 {
47 public:
48  Session( Application&, MessageStoreFactory&,
49  const SessionID&,
50  const DataDictionaryProvider&,
51  const TimeRange&,
52  int heartBtInt, LogFactory* pLogFactory );
53  virtual ~Session();
54 
55  void logon()
56  { m_state.enabled( true ); m_state.logoutReason( "" ); }
57  void logout( const std::string& reason = "" )
58  { m_state.enabled( false ); m_state.logoutReason( reason ); }
59  bool isEnabled()
60  { return m_state.enabled(); }
61 
62  bool sentLogon() { return m_state.sentLogon(); }
63  bool sentLogout() { return m_state.sentLogout(); }
64  bool receivedLogon() { return m_state.receivedLogon(); }
65  bool isLoggedOn() { return receivedLogon() && sentLogon(); }
66  void reset() throw( IOException )
68  void refresh() throw( IOException )
69  { m_state.refresh(); }
70  void setNextSenderMsgSeqNum( int num ) throw( IOException )
72  void setNextTargetMsgSeqNum( int num ) throw( IOException )
74 
75  const SessionID& getSessionID() const
76  { return m_sessionID; }
77  void setDataDictionaryProvider( const DataDictionaryProvider& dataDictionaryProvider )
78  { m_dataDictionaryProvider = dataDictionaryProvider; }
79  const DataDictionaryProvider& getDataDictionaryProvider() const
80  { return m_dataDictionaryProvider; }
81 
82  static bool sendToTarget( Message& message,
83  const std::string& qualifier = "" )
84  throw( SessionNotFound );
85  static bool sendToTarget( Message& message, const SessionID& sessionID )
86  throw( SessionNotFound );
87  static bool sendToTarget( Message&,
88  const SenderCompID& senderCompID,
89  const TargetCompID& targetCompID,
90  const std::string& qualifier = "" )
91  throw( SessionNotFound );
92  static bool sendToTarget( Message& message,
93  const std::string& senderCompID,
94  const std::string& targetCompID,
95  const std::string& qualifier = "" )
96  throw( SessionNotFound );
97 
98  static std::set<SessionID> getSessions();
99  static bool doesSessionExist( const SessionID& );
100  static Session* lookupSession( const SessionID& );
101  static Session* lookupSession( const std::string&, bool reverse = false );
102  static bool isSessionRegistered( const SessionID& );
103  static Session* registerSession( const SessionID& );
104  static void unregisterSession( const SessionID& );
105 
106  static size_t numSessions();
107 
108  bool isSessionTime(const UtcTimeStamp& time)
109  { return m_sessionTime.isInRange(time); }
110  bool isLogonTime(const UtcTimeStamp& time)
111  { return m_logonTime.isInRange(time); }
112  bool isInitiator()
113  { return m_state.initiate(); }
114  bool isAcceptor()
115  { return !m_state.initiate(); }
116 
117  const TimeRange& getLogonTime()
118  { return m_logonTime; }
119  void setLogonTime( const TimeRange& value )
120  { m_logonTime = value; }
121 
122  const std::string& getSenderDefaultApplVerID()
123  { return m_senderDefaultApplVerID; }
124  void setSenderDefaultApplVerID( const std::string& senderDefaultApplVerID )
125  { m_senderDefaultApplVerID = senderDefaultApplVerID; }
126 
127  const std::string& getTargetDefaultApplVerID()
128  { return m_targetDefaultApplVerID; }
129  void setTargetDefaultApplVerID( const std::string& targetDefaultApplVerID )
130  { m_targetDefaultApplVerID = targetDefaultApplVerID; }
131 
134  void setSendRedundantResendRequests ( bool value )
135  { m_sendRedundantResendRequests = value; }
136 
137  bool getCheckCompId()
138  { return m_checkCompId; }
139  void setCheckCompId ( bool value )
140  { m_checkCompId = value; }
141 
143  { return m_checkLatency; }
144  void setCheckLatency ( bool value )
145  { m_checkLatency = value; }
146 
147  int getMaxLatency()
148  { return m_maxLatency; }
149  void setMaxLatency ( int value )
150  { m_maxLatency = value; }
151 
152  int getLogonTimeout()
153  { return m_state.logonTimeout(); }
154  void setLogonTimeout ( int value )
155  { m_state.logonTimeout( value ); }
156 
157  int getLogoutTimeout()
158  { return m_state.logoutTimeout(); }
159  void setLogoutTimeout ( int value )
160  { m_state.logoutTimeout( value ); }
161 
162  bool getResetOnLogon()
163  { return m_resetOnLogon; }
164  void setResetOnLogon ( bool value )
165  { m_resetOnLogon = value; }
166 
167  bool getResetOnLogout()
168  { return m_resetOnLogout; }
169  void setResetOnLogout ( bool value )
170  { m_resetOnLogout = value; }
171 
172  bool getResetOnDisconnect()
174  void setResetOnDisconnect( bool value )
175  { m_resetOnDisconnect = value; }
176 
177  bool getRefreshOnLogon()
178  { return m_refreshOnLogon; }
179  void setRefreshOnLogon( bool value )
180  { m_refreshOnLogon = value; }
181 
183  { return (m_timestampPrecision == 3); }
184  void setMillisecondsInTimeStamp ( bool value )
185  { if (value)
187  else
189  }
192  void setTimestampPrecision(int precision)
193  {
194  if (precision < 0 || precision > 9)
195  return;
196 
197  m_timestampPrecision = precision;
198  }
199 
200  bool getPersistMessages()
201  { return m_persistMessages; }
202  void setPersistMessages ( bool value )
203  { m_persistMessages = value; }
204 
207  void setValidateLengthAndChecksum ( bool value )
209 
210  void setResponder( Responder* pR )
211  {
213  reset();
214  m_pResponder = pR;
215  }
216 
217  bool send( Message& );
218  void next();
219  void next( const UtcTimeStamp& timeStamp );
220  void next( const std::string&, const UtcTimeStamp& timeStamp, bool queued = false );
221  void next( const Message&, const UtcTimeStamp& timeStamp, bool queued = false );
222  void disconnect();
223 
226 
227  Log* getLog() { return &m_state; }
228  const MessageStore* getStore() { return &m_state; }
229 
230  const HeartBtInt& getHeartBtInt() const { return m_state.heartBtInt(); }
231 
232 private:
233  typedef std::map < SessionID, Session* > Sessions;
234  typedef std::set < SessionID > SessionIDs;
235 
236  static bool addSession( Session& );
237  static void removeSession( Session& );
238 
239  bool send( const std::string& );
240  bool sendRaw( Message&, int msgSeqNum = 0 );
241  bool resend( Message& message );
242  void persist( const Message&, const std::string& ) throw ( IOException );
243 
246  const UtcTimeStamp& when = UtcTimeStamp () );
247  void fill( Header& );
248 
249  bool isGoodTime( const SendingTime& sendingTime )
250  {
251  if ( !m_checkLatency ) return true;
252  UtcTimeStamp now;
253  return labs( now - sendingTime ) <= m_maxLatency;
254  }
255  bool checkSessionTime( const UtcTimeStamp& timeStamp )
256  {
257  UtcTimeStamp creationTime = m_state.getCreationTime();
258  return m_sessionTime.isInSameRange( timeStamp, creationTime );
259  }
260  bool isTargetTooHigh( const MsgSeqNum& msgSeqNum )
261  { return msgSeqNum > ( m_state.getNextTargetMsgSeqNum() ); }
262  bool isTargetTooLow( const MsgSeqNum& msgSeqNum )
263  { return msgSeqNum < ( m_state.getNextTargetMsgSeqNum() ); }
264  bool isCorrectCompID( const SenderCompID& senderCompID,
265  const TargetCompID& targetCompID )
266  {
267  if( !m_checkCompId ) return true;
268 
269  return
270  m_sessionID.getSenderCompID().getValue() == targetCompID.getValue()
271  && m_sessionID.getTargetCompID().getValue() == senderCompID.getValue();
272  }
273  bool shouldSendReset();
274 
275  bool validLogonState( const MsgType& msgType );
276  void fromCallback( const MsgType& msgType, const Message& msg,
277  const SessionID& sessionID );
278 
279  void doBadTime( const Message& msg );
280  void doBadCompID( const Message& msg );
281  bool doPossDup( const Message& msg );
282  bool doTargetTooLow( const Message& msg );
283  void doTargetTooHigh( const Message& msg );
284  void nextQueued( const UtcTimeStamp& timeStamp );
285  bool nextQueued( int num, const UtcTimeStamp& timeStamp );
286 
287  void nextLogon( const Message&, const UtcTimeStamp& timeStamp );
288  void nextHeartbeat( const Message&, const UtcTimeStamp& timeStamp );
289  void nextTestRequest( const Message&, const UtcTimeStamp& timeStamp );
290  void nextLogout( const Message&, const UtcTimeStamp& timeStamp );
291  void nextReject( const Message&, const UtcTimeStamp& timeStamp );
292  void nextSequenceReset( const Message&, const UtcTimeStamp& timeStamp );
293  void nextResendRequest( const Message&, const UtcTimeStamp& timeStamp );
294 
295  void generateLogon();
296  void generateLogon( const Message& );
297  void generateResendRequest( const BeginString&, const MsgSeqNum& );
298  void generateSequenceReset( int, int );
299  void generateHeartbeat();
300  void generateHeartbeat( const Message& );
301  void generateTestRequest( const std::string& );
302  void generateReject( const Message&, int err, int field = 0 );
303  void generateReject( const Message&, const std::string& );
304  void generateBusinessReject( const Message&, int err, int field = 0 );
305  void generateLogout( const std::string& text = "" );
306 
307  void populateRejectReason( Message&, int field, const std::string& );
308  void populateRejectReason( Message&, const std::string& );
309 
310  bool verify( const Message& msg,
311  bool checkTooHigh = true, bool checkTooLow = true );
312 
313  bool set( int s, const Message& m );
314  bool get( int s, Message& m ) const;
315 
316  Message * newMessage(const std::string & msgType) const;
317 
322 
323  std::string m_senderDefaultApplVerID;
324  std::string m_targetDefaultApplVerID;
326  bool m_checkCompId;
327  bool m_checkLatency;
328  int m_maxLatency;
329  bool m_resetOnLogon;
330  bool m_resetOnLogout;
331  bool m_resetOnDisconnect;
332  bool m_refreshOnLogon;
334  bool m_persistMessages;
336 
342  Mutex m_mutex;
343 
344  static Sessions s_sessions;
345  static SessionIDs s_sessionIDs;
346  static Sessions s_registered;
347  static Mutex s_mutex;
348 };
349 }
350 
351 #endif //FIX_SESSION_H
FIX::Session::m_checkCompId
bool m_checkCompId
Definition: Session.h:360
FIX::SessionState::reset
void reset()
Definition: SessionState.h:225
FIX::Session::checkSessionTime
bool checkSessionTime(const UtcTimeStamp &timeStamp)
Definition: Session.h:289
SessionID.h
FIX::Session::generateBusinessReject
void generateBusinessReject(const Message &, int err, int field=0)
Definition: Session.cpp:948
FIX::Session::m_targetDefaultApplVerID
std::string m_targetDefaultApplVerID
Definition: Session.h:358
FIX::Session::doTargetTooLow
bool doTargetTooLow(const Message &msg)
Definition: Session.cpp:1203
FIX::Session::getTimestampPrecision
int getTimestampPrecision()
Definition: Session.h:224
FIX::Session::m_resetOnLogout
bool m_resetOnLogout
Definition: Session.h:364
Fields.h
FIX::Session::m_maxLatency
int m_maxLatency
Definition: Session.h:362
FIX::Session::setTargetDefaultApplVerID
void setTargetDefaultApplVerID(const std::string &targetDefaultApplVerID)
Definition: Session.h:163
FIX::SessionState::setNextTargetMsgSeqNum
void setNextTargetMsgSeqNum(int n)
Definition: SessionState.h:217
FIX::Session::setMaxLatency
void setMaxLatency(int value)
Definition: Session.h:183
FIX::Session::generateReject
void generateReject(const Message &, int err, int field=0)
Definition: Session.cpp:822
FIX::Session::nextReject
void nextReject(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:329
FIX::Session::lookupSession
static Session * lookupSession(const SessionID &)
Definition: Session.cpp:1513
FIX::SessionState::logonTimeout
int logonTimeout() const
Definition: SessionState.h:105
FIX::Session::nextLogon
void nextLogon(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:219
FIX::SessionState::getNextTargetMsgSeqNum
int getNextTargetMsgSeqNum() const
Definition: SessionState.h:213
FIX::Session::unregisterSession
static void unregisterSession(const SessionID &)
Definition: Session.cpp:1564
FIX::MessageStoreFactory
This interface must be implemented to create a MessageStore.
Definition: MessageStore.h:58
FIX::Session::getCheckCompId
bool getCheckCompId()
Definition: Session.h:171
FIX::Session::m_resetOnLogon
bool m_resetOnLogon
Definition: Session.h:363
FIX::TimeRange
Keeps track of when session is active.
Definition: TimeRange.h:51
FIX::Session::verify
bool verify(const Message &msg, bool checkTooHigh=true, bool checkTooLow=true)
Definition: Session.cpp:1051
FIX::Session::setTimestampPrecision
void setTimestampPrecision(int precision)
Definition: Session.h:226
FIX::UtcTimeStamp
Date and Time represented in UTC.
Definition: FieldTypes.h:599
FIX::Session::isAcceptor
bool isAcceptor()
Definition: Session.h:148
FIX::Session::getExpectedTargetNum
int getExpectedTargetNum()
Definition: Session.h:259
FIX::Session::Sessions
std::map< SessionID, Session * > Sessions
Definition: Session.h:267
FIX::Session::s_sessionIDs
static SessionIDs s_sessionIDs
Definition: Session.h:379
FIX::Session::receivedLogon
bool receivedLogon()
Definition: Session.h:98
FIX::Session::setNextTargetMsgSeqNum
void setNextTargetMsgSeqNum(int num)
Definition: Session.h:106
FIX::Session::isTargetTooLow
bool isTargetTooLow(const MsgSeqNum &msgSeqNum)
Definition: Session.h:296
FIX::Session::m_timestampPrecision
int m_timestampPrecision
Definition: Session.h:367
FIX::Session::getPersistMessages
bool getPersistMessages()
Definition: Session.h:234
FIX::Session::reset
void reset()
Definition: Session.h:100
FIX::Session::getLogoutTimeout
int getLogoutTimeout()
Definition: Session.h:191
FIX::Mutex
Portable implementation of a mutex.
Definition: Mutex.h:47
FIX::Session::refresh
void refresh()
Definition: Session.h:102
FIX::Session::getSendRedundantResendRequests
bool getSendRedundantResendRequests()
Definition: Session.h:166
FIX::Session::setResetOnLogout
void setResetOnLogout(bool value)
Definition: Session.h:203
FIX::SessionState::getNextSenderMsgSeqNum
int getNextSenderMsgSeqNum() const
Definition: SessionState.h:211
FIX::Session::setValidateLengthAndChecksum
void setValidateLengthAndChecksum(bool value)
Definition: Session.h:241
FIX::Session::removeSession
static void removeSession(Session &)
Definition: Session.cpp:1590
FIX::Session::isSessionTime
bool isSessionTime(const UtcTimeStamp &time)
Definition: Session.h:142
FIX::Session::getSessionID
const SessionID & getSessionID() const
Definition: Session.h:109
FIX::Session::getMillisecondsInTimeStamp
bool getMillisecondsInTimeStamp()
Definition: Session.h:216
FIX::Session::getSessions
static std::set< SessionID > getSessions()
Definition: Session.cpp:1502
FIX::Session::m_persistMessages
bool m_persistMessages
Definition: Session.h:368
FIX::Session::doBadCompID
void doBadCompID(const Message &msg)
Definition: Session.cpp:1169
FIX::Session::s_sessions
static Sessions s_sessions
Definition: Session.h:378
FIX::Session::SessionIDs
std::set< SessionID > SessionIDs
Definition: Session.h:268
FIX::Session::registerSession
static Session * registerSession(const SessionID &)
Definition: Session.cpp:1554
FIX::Session::m_sessionID
SessionID m_sessionID
Definition: Session.h:353
FIX::Application
This interface must be implemented to define what your FIX application does.
Definition: Application.h:60
FIX::Session::numSessions
static size_t numSessions()
Definition: Session.cpp:1570
FIX::Session::setDataDictionaryProvider
void setDataDictionaryProvider(const DataDictionaryProvider &dataDictionaryProvider)
Definition: Session.h:111
FIX::SessionState::sentLogout
bool sentLogout() const
Definition: SessionState.h:90
FIX::Session::doBadTime
void doBadTime(const Message &msg)
Definition: Session.cpp:1163
FIX::Session::m_sendRedundantResendRequests
bool m_sendRedundantResendRequests
Definition: Session.h:359
FIX::SessionID
Unique session id consists of BeginString, SenderCompID and TargetCompID.
Definition: SessionID.h:47
FIX::Session::generateSequenceReset
void generateSequenceReset(int, int)
Definition: Session.cpp:760
FIX::Session::m_sessionTime
TimeRange m_sessionTime
Definition: Session.h:354
FIX::Session::generateResendRequest
void generateResendRequest(const BeginString &, const MsgSeqNum &)
Definition: Session.cpp:735
FIX::Session::setCheckLatency
void setCheckLatency(bool value)
Definition: Session.h:178
FIX::Session::next
void next()
Definition: Session.cpp:142
FIX::IOException
IO Error.
Definition: Exceptions.h:255
FIX::Session::isGoodTime
bool isGoodTime(const SendingTime &sendingTime)
Definition: Session.h:283
FIX::Session::m_state
SessionState m_state
Definition: Session.h:371
FIX::Session::m_messageStoreFactory
MessageStoreFactory & m_messageStoreFactory
Definition: Session.h:373
FIX::SessionID::getSenderCompID
const SenderCompID & getSenderCompID() const
Definition: SessionID.h:89
FIX::Session::m_senderDefaultApplVerID
std::string m_senderDefaultApplVerID
Definition: Session.h:357
FIX::TYPE::UtcTimeStamp
@ UtcTimeStamp
Definition: FieldTypes.h:940
FIX::SessionState::enabled
bool enabled() const
Definition: SessionState.h:84
FIX::SessionState::initiate
bool initiate() const
Definition: SessionState.h:102
Mutex.h
FIX::Session::validLogonState
bool validLogonState(const MsgType &msgType)
Definition: Session.cpp:1134
FIX::Session::s_registered
static Sessions s_registered
Definition: Session.h:380
FIX::SessionState::setNextSenderMsgSeqNum
void setNextSenderMsgSeqNum(int n)
Definition: SessionState.h:215
FIX::Session::getLogonTime
const TimeRange & getLogonTime()
Definition: Session.h:151
FIX::Session::setResetOnDisconnect
void setResetOnDisconnect(bool value)
Definition: Session.h:208
FIX::Session::isLogonTime
bool isLogonTime(const UtcTimeStamp &time)
Definition: Session.h:144
FIX::Session::doesSessionExist
static bool doesSessionExist(const SessionID &)
Definition: Session.cpp:1507
FIX::Session::m_checkLatency
bool m_checkLatency
Definition: Session.h:361
FIX::Session::getLog
Log * getLog()
Definition: Session.h:261
FIX::Session::generateLogon
void generateLogon()
Definition: Session.cpp:690
FIX::Session::isSessionRegistered
static bool isSessionRegistered(const SessionID &)
Definition: Session.cpp:1548
FIX::Session::get
bool get(int s, Message &m) const
FIX::MessageStore
This interface must be implemented to store and retrieve messages and sequence numbers.
Definition: MessageStore.h:83
FIX::Session::generateTestRequest
void generateTestRequest(const std::string &)
Definition: Session.cpp:809
FIX::Session::populateRejectReason
void populateRejectReason(Message &, int field, const std::string &)
Definition: Session.cpp:1026
FIX::Session::fromCallback
void fromCallback(const MsgType &msgType, const Message &msg, const SessionID &sessionID)
Definition: Session.cpp:1154
FIX::Session::getSenderDefaultApplVerID
const std::string & getSenderDefaultApplVerID()
Definition: Session.h:156
FIX::Session::getRefreshOnLogon
bool getRefreshOnLogon()
Definition: Session.h:211
FIX::Session::sentLogout
bool sentLogout()
Definition: Session.h:97
DataDictionaryProvider.h
FIX::Session::setLogoutTimeout
void setLogoutTimeout(int value)
Definition: Session.h:193
FIX::Session::Session
Session(Application &, MessageStoreFactory &, const SessionID &, const DataDictionaryProvider &, const TimeRange &, int heartBtInt, LogFactory *pLogFactory)
Definition: Session.cpp:58
FIX::Session::sendRaw
bool sendRaw(Message &, int msgSeqNum=0)
Definition: Session.cpp:547
FIX::Session::setSenderDefaultApplVerID
void setSenderDefaultApplVerID(const std::string &senderDefaultApplVerID)
Definition: Session.h:158
FIX::SessionState::getCreationTime
UtcTimeStamp getCreationTime() const
Definition: SessionState.h:223
FIX::Session::setLogonTime
void setLogonTime(const TimeRange &value)
Definition: Session.h:153
FIX::SessionState::sentLogon
bool sentLogon() const
Definition: SessionState.h:93
FIX::Session::doPossDup
bool doPossDup(const Message &msg)
Definition: Session.cpp:1175
FIX::SessionState::logoutTimeout
int logoutTimeout() const
Definition: SessionState.h:108
FIX::Session::fill
void fill(Header &)
Definition: Session.cpp:131
FIX::Session::getMaxLatency
int getMaxLatency()
Definition: Session.h:181
FIX::TimeRange::isInSameRange
static bool isInSameRange(const UtcTimeOnly &start, const UtcTimeOnly &end, const DateTime &time1, const DateTime &time2)
Definition: TimeRange.h:110
FIX::SessionState::logoutReason
std::string logoutReason() const
Definition: SessionState.h:184
FIX::Session::isLoggedOn
bool isLoggedOn()
Definition: Session.h:99
Application.h
FIX::Session::addSession
static bool addSession(Session &)
Definition: Session.cpp:1576
FIX::Session::setPersistMessages
void setPersistMessages(bool value)
Definition: Session.h:236
FIX::Session::getLogonTimeout
int getLogonTimeout()
Definition: Session.h:186
FIX::Session::sentLogon
bool sentLogon()
Definition: Session.h:96
FIX::Session::isCorrectCompID
bool isCorrectCompID(const SenderCompID &senderCompID, const TargetCompID &targetCompID)
Definition: Session.h:298
SessionState.h
FIX::SessionState::receivedLogon
bool receivedLogon() const
Definition: SessionState.h:87
FIX::SessionNotFound
Session cannot be found for specified action.
Definition: Exceptions.h:248
FIX::Message
Base class for all FIX messages.
Definition: Message.h:134
FIX::Session::getHeartBtInt
const HeartBtInt & getHeartBtInt() const
Definition: Session.h:264
FIX::Responder
Interface implements sending on and disconnecting a transport.
Definition: Responder.h:51
FIX::Session::m_application
Application & m_application
Definition: Session.h:352
FIX::Session::isInitiator
bool isInitiator()
Definition: Session.h:146
reverse
void reverse(I begin, I end)
Definition: pugixml.cpp:6009
FIX::Session::getExpectedSenderNum
int getExpectedSenderNum()
Definition: Session.h:258
FIX::Session::isEnabled
bool isEnabled()
Definition: Session.h:93
FIX
Definition: Acceptor.cpp:34
FIX::Session::doTargetTooHigh
void doTargetTooHigh(const Message &msg)
Definition: Session.cpp:1223
FIX::Session::getDataDictionaryProvider
const DataDictionaryProvider & getDataDictionaryProvider() const
Definition: Session.h:113
FIX::TimeRange::isInRange
static bool isInRange(const UtcTimeOnly &start, const UtcTimeOnly &end, const DateTime &time)
Definition: TimeRange.h:77
FIX::Session::nextSequenceReset
void nextSequenceReset(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:336
FIX::Session::isTargetTooHigh
bool isTargetTooHigh(const MsgSeqNum &msgSeqNum)
Definition: Session.h:294
FIX::Session::nextResendRequest
void nextResendRequest(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:361
FIX::Session::shouldSendReset
bool shouldSendReset()
Definition: Session.cpp:1123
FIX::Session::getTargetDefaultApplVerID
const std::string & getTargetDefaultApplVerID()
Definition: Session.h:161
FIX::SessionID::getTargetCompID
const TargetCompID & getTargetCompID() const
Definition: SessionID.h:91
FIX::Session::generateHeartbeat
void generateHeartbeat()
Definition: Session.cpp:781
FIX::Session::disconnect
void disconnect()
Definition: Session.cpp:630
FIX::Session::nextHeartbeat
void nextHeartbeat(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:297
FIX::Session::setResetOnLogon
void setResetOnLogon(bool value)
Definition: Session.h:198
FIX::Session::setNextSenderMsgSeqNum
void setNextSenderMsgSeqNum(int num)
Definition: Session.h:104
FIX::Header
Definition: Message.h:58
FIX::Session::m_logonTime
TimeRange m_logonTime
Definition: Session.h:355
FIX::Session::~Session
virtual ~Session()
Definition: Session.cpp:100
FIX::Session::getResetOnDisconnect
bool getResetOnDisconnect()
Definition: Session.h:206
FIX::Session::logon
void logon()
Definition: Session.h:89
FIX::Session::setResponder
void setResponder(Responder *pR)
Definition: Session.h:244
FIX::Session::set
bool set(int s, const Message &m)
FIX::Session::sendToTarget
static bool sendToTarget(Message &message, const std::string &qualifier="")
Definition: Session.cpp:1461
FIX::Session::setCheckCompId
void setCheckCompId(bool value)
Definition: Session.h:173
FIX::Session::setMillisecondsInTimeStamp
void setMillisecondsInTimeStamp(bool value)
Definition: Session.h:218
Responder.h
FIX::Session::m_pResponder
Responder * m_pResponder
Definition: Session.h:375
FIX::Session::logout
void logout(const std::string &reason="")
Definition: Session.h:91
FIX::Session::persist
void persist(const Message &, const std::string &)
Definition: Session.cpp:680
TimeRange.h
FIX::Session::nextTestRequest
void nextTestRequest(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:304
FIX::Session::m_dataDictionaryProvider
DataDictionaryProvider m_dataDictionaryProvider
Definition: Session.h:372
FIX::Session::m_mutex
Mutex m_mutex
Definition: Session.h:376
FIX::Session::s_mutex
static Mutex s_mutex
Definition: Session.h:381
FIX::Session::m_validateLengthAndChecksum
bool m_validateLengthAndChecksum
Definition: Session.h:369
FIX::SessionState::refresh
void refresh()
Definition: SessionState.h:227
FIX::Session::generateLogout
void generateLogout(const std::string &text="")
Definition: Session.cpp:1013
FIX::LogFactory
This interface must be implemented to create a Log.
Definition: Log.h:59
FIX::Session::getStore
const MessageStore * getStore()
Definition: Session.h:262
FIX::Session::insertSendingTime
void insertSendingTime(Header &)
Definition: Session.cpp:108
FIX::DataDictionaryProvider
Queries for DataDictionary based on appropriate version of FIX.
Definition: DataDictionaryProvider.h:59
FIX::Session::resend
bool resend(Message &message)
Definition: Session.cpp:660
FIX::Session::setRefreshOnLogon
void setRefreshOnLogon(bool value)
Definition: Session.h:213
FIX::Session::nextLogout
void nextLogout(const Message &, const UtcTimeStamp &timeStamp)
Definition: Session.cpp:312
FIX::Session::setSendRedundantResendRequests
void setSendRedundantResendRequests(bool value)
Definition: Session.h:168
FIX::Session::m_refreshOnLogon
bool m_refreshOnLogon
Definition: Session.h:366
FIX::Session::getCheckLatency
bool getCheckLatency()
Definition: Session.h:176
FIX::Log
This interface must be implemented to log messages and events.
Definition: Log.h:98
FIX::SessionState
Maintains all of state for the Session class.
Definition: SessionState.h:54
FIX::Session::m_pLogFactory
LogFactory * m_pLogFactory
Definition: Session.h:374
Log.h
FIX::Session::m_resetOnDisconnect
bool m_resetOnDisconnect
Definition: Session.h:365
FIX::Session::getResetOnLogout
bool getResetOnLogout()
Definition: Session.h:201
FIX::Session::setLogonTimeout
void setLogonTimeout(int value)
Definition: Session.h:188
FIX::Session
Maintains the state and implements the logic of a FIX session.
Definition: Session.h:62
FIX::Session::getValidateLengthAndChecksum
bool getValidateLengthAndChecksum()
Definition: Session.h:239
FIX::Session::send
bool send(Message &)
Definition: Session.cpp:540
FIX::Session::insertOrigSendingTime
void insertOrigSendingTime(Header &, const UtcTimeStamp &when=UtcTimeStamp())
Definition: Session.cpp:120
FIX::SessionState::heartBtInt
void heartBtInt(const HeartBtInt &value)
Definition: SessionState.h:128
FIX::Session::getResetOnLogon
bool getResetOnLogon()
Definition: Session.h:196
FIX::Session::newMessage
Message * newMessage(const std::string &msgType) const
Definition: Session.cpp:509
FIX::Session::nextQueued
void nextQueued(const UtcTimeStamp &timeStamp)
Definition: Session.cpp:1255

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001