![]() |
![]() |
|
Index
Source Files
Annotated Class List
Alphabetical Class List
Class Hierarchy
Graphical Class Hierarchy
|
||
![]() |
![]() |
#include <SessionState.h>
Inheritance diagram for FIX::SessionState:


Public Types | |
| typedef std::pair< int, int > | ResendRange |
Public Member Functions | |
| SessionState () | |
| bool | enabled () const |
| void | enabled (bool value) |
| bool | receivedLogon () const |
| void | receivedLogon (bool value) |
| bool | sentLogout () const |
| void | sentLogout (bool value) |
| bool | sentLogon () const |
| void | sentLogon (bool value) |
| bool | receivedReset () const |
| void | receivedReset (bool value) |
| bool | sentReset () const |
| void | sentReset (bool value) |
| bool | initiate () const |
| void | initiate (bool value) |
| int | logonTimeout () const |
| void | logonTimeout (int value) |
| int | logoutTimeout () const |
| void | logoutTimeout (int value) |
| int | testRequest () const |
| void | testRequest (int value) |
| bool | resendRequested () const |
| ResendRange | resendRange () const |
| void | resendRange (int begin, int end) |
| MessageStore * | store () |
| void | store (MessageStore *pValue) |
| Log * | log () |
| void | log (Log *pValue) |
| void | heartBtInt (const HeartBtInt &value) |
| HeartBtInt & | heartBtInt () |
| const HeartBtInt & | heartBtInt () const |
| void | lastSentTime (const UtcTimeStamp &value) |
| UtcTimeStamp & | lastSentTime () |
| const UtcTimeStamp & | lastSentTime () const |
| void | lastReceivedTime (const UtcTimeStamp &value) |
| UtcTimeStamp & | lastReceivedTime () |
| const UtcTimeStamp & | lastReceivedTime () const |
| bool | shouldSendLogon () const |
| bool | alreadySentLogon () const |
| bool | logonTimedOut () const |
| bool | logoutTimedOut () const |
| bool | withinHeartBeat () const |
| bool | timedOut () const |
| bool | needHeartbeat () const |
| bool | needTestRequest () const |
| std::string | logoutReason () const |
| void | logoutReason (const std::string &value) |
| void | queue (int msgSeqNum, const Message &message) |
| bool | retreive (int msgSeqNum, Message &message) |
| void | clearQueue () |
| bool | set (int s, const std::string &m) throw ( IOException ) |
| void | get (int b, int e, std::vector< std::string > &m) const throw ( IOException ) |
| int | getNextSenderMsgSeqNum () const throw ( IOException ) |
| int | getNextTargetMsgSeqNum () const throw ( IOException ) |
| void | setNextSenderMsgSeqNum (int n) throw ( IOException ) |
| void | setNextTargetMsgSeqNum (int n) throw ( IOException ) |
| void | incrNextSenderMsgSeqNum () throw ( IOException ) |
| void | incrNextTargetMsgSeqNum () throw ( IOException ) |
| UtcTimeStamp | getCreationTime () const throw ( IOException ) |
| void | reset () throw ( IOException ) |
| void | refresh () throw ( IOException ) |
| void | clear () |
| void | onIncoming (const std::string &string) |
| void | onOutgoing (const std::string &string) |
| void | onEvent (const std::string &string) |
Private Types | |
| typedef std::map< int, Message > | Messages |
Private Attributes | |
| bool | m_enabled |
| bool | m_receivedLogon |
| bool | m_sentLogout |
| bool | m_sentLogon |
| bool | m_sentReset |
| bool | m_receivedReset |
| bool | m_initiate |
| int | m_logonTimeout |
| int | m_logoutTimeout |
| int | m_testRequest |
| ResendRange | m_resendRange |
| HeartBtInt | m_heartBtInt |
| UtcTimeStamp | m_lastSentTime |
| UtcTimeStamp | m_lastReceivedTime |
| std::string | m_logoutReason |
| Messages | m_queue |
| MessageStore * | m_pStore |
| Log * | m_pLog |
| Mutex | m_mutex |
Definition at line 37 of file SessionState.h.
|
|
Definition at line 39 of file SessionState.h. |
|
|
Definition at line 83 of file SessionState.h. Referenced by FIX::Session::doTargetTooHigh(), resendRange(), and FIX::Session::verify(). |
|
|
Definition at line 42 of file SessionState.h. References m_enabled, m_initiate, m_logonTimeout, m_logoutTimeout, m_receivedLogon, m_receivedReset, m_sentLogon, m_sentLogout, m_sentReset, and m_testRequest.
00043 : m_enabled( true ), m_receivedLogon( false ), 00044 m_sentLogout( false ), m_sentLogon( false ), 00045 m_sentReset( false ), m_receivedReset( false ), 00046 m_initiate( false ), m_logonTimeout( 10 ), 00047 m_logoutTimeout( 2 ), m_testRequest( 0 ), 00048 m_pStore( 0 ), m_pLog( 0 ) {} |
|
|
Definition at line 116 of file SessionState.h. References initiate(), and sentLogon(). Referenced by FIX::Session::next().
|
|
|
Implements FIX::Log. Definition at line 196 of file SessionState.h. References FIX::Log::clear().
|
|
|
Definition at line 169 of file SessionState.h. Referenced by FIX::Session::disconnect().
00170 { Locker l( m_mutex ); m_queue.clear(); }
|
|
|
Definition at line 51 of file SessionState.h. References m_enabled.
00051 { m_enabled = value; }
|
|
|
Definition at line 50 of file SessionState.h. References m_enabled. Referenced by FIX::Session::isEnabled(), FIX::Session::logon(), and FIX::Session::logout().
00050 { return m_enabled; }
|
|
||||||||||||||||
|
Implements FIX::MessageStore. Definition at line 174 of file SessionState.h. References FIX::MessageStore::get(). Referenced by FIX::Session::nextResendRequest().
00176 { Locker l( m_mutex ); m_pStore->get( b, e, m ); }
|
|
|
Implements FIX::MessageStore. Definition at line 189 of file SessionState.h. References FIX::MessageStore::getCreationTime(). Referenced by FIX::Session::checkSessionTime().
00190 { Locker l( m_mutex ); return m_pStore->getCreationTime(); }
|
|
|
Implements FIX::MessageStore. Definition at line 177 of file SessionState.h. References FIX::MessageStore::getNextSenderMsgSeqNum(). Referenced by FIX::Session::getExpectedSenderNum(), and FIX::Session::nextResendRequest().
00178 { Locker l( m_mutex ); return m_pStore->getNextSenderMsgSeqNum(); }
|
|
|
Implements FIX::MessageStore. Definition at line 179 of file SessionState.h. References FIX::MessageStore::getNextTargetMsgSeqNum(). Referenced by FIX::Session::getExpectedTargetNum(), FIX::Session::isTargetTooHigh(), and FIX::Session::isTargetTooLow().
00180 { Locker l( m_mutex ); return m_pStore->getNextTargetMsgSeqNum(); }
|
|
|
Definition at line 98 of file SessionState.h. References m_heartBtInt.
00099 { return m_heartBtInt; }
|
|
|
Definition at line 96 of file SessionState.h. References m_heartBtInt. Referenced by needHeartbeat(), needTestRequest(), timedOut(), and withinHeartBeat().
00097 { return m_heartBtInt; }
|
|
|
Definition at line 94 of file SessionState.h. References m_heartBtInt. Referenced by FIX::Session::generateLogon(), FIX::Session::next(), FIX::Session::nextLogon(), and FIX::Session::Session().
00095 { m_heartBtInt = value; }
|
|
|
Implements FIX::MessageStore. Definition at line 185 of file SessionState.h. References FIX::MessageStore::incrNextSenderMsgSeqNum(). Referenced by FIX::Session::sendRaw().
00186 { Locker l( m_mutex ); m_pStore->incrNextSenderMsgSeqNum(); }
|
|
|
Implements FIX::MessageStore. Definition at line 187 of file SessionState.h. References FIX::MessageStore::incrNextTargetMsgSeqNum(). Referenced by FIX::Session::generateBusinessReject(), FIX::Session::generateReject(), FIX::Session::next(), FIX::Session::nextHeartbeat(), FIX::Session::nextLogon(), FIX::Session::nextLogout(), FIX::Session::nextQueued(), FIX::Session::nextReject(), FIX::Session::nextResendRequest(), and FIX::Session::nextTestRequest().
00188 { Locker l( m_mutex ); m_pStore->incrNextTargetMsgSeqNum(); }
|
|
|
Definition at line 69 of file SessionState.h. References m_initiate.
00069 { m_initiate = value; }
|
|
|
Definition at line 68 of file SessionState.h. References m_initiate. Referenced by alreadySentLogon(), FIX::Session::nextLogon(), FIX::Session::Session(), and shouldSendLogon().
00068 { return m_initiate; }
|
|
|
Definition at line 112 of file SessionState.h. References m_lastReceivedTime.
00113 { return m_lastReceivedTime; }
|
|
|
Definition at line 110 of file SessionState.h. References m_lastReceivedTime. Referenced by logonTimedOut(), needTestRequest(), timedOut(), and withinHeartBeat().
00111 { return m_lastReceivedTime; }
|
|
|
Definition at line 108 of file SessionState.h. References m_lastReceivedTime. Referenced by FIX::Session::generateLogon(), and FIX::Session::verify().
00109 { m_lastReceivedTime = value; }
|
|
|
Definition at line 105 of file SessionState.h. References m_lastSentTime.
00106 { return m_lastSentTime; }
|
|
|
Definition at line 103 of file SessionState.h. References m_lastSentTime. Referenced by logoutTimedOut(), needHeartbeat(), and withinHeartBeat().
00104 { return m_lastSentTime; }
|
|
|
Definition at line 101 of file SessionState.h. References m_lastSentTime. Referenced by FIX::Session::fill().
00102 { m_lastSentTime = value; }
|
|
|
Definition at line 92 of file SessionState.h.
00092 { m_pLog = pValue; }
|
|
|
Definition at line 91 of file SessionState.h. Referenced by FIX::Session::Session(), and FIX::Session::~Session().
00091 { return m_pLog; }
|
|
|
Definition at line 117 of file SessionState.h. References lastReceivedTime(), and logonTimeout(). Referenced by FIX::Session::next().
00118 {
00119 UtcTimeStamp now;
00120 return now - lastReceivedTime() >= logonTimeout();
00121 }
|
|
|
Definition at line 72 of file SessionState.h. References m_logonTimeout.
00072 { m_logonTimeout = value; }
|
|
|
Definition at line 71 of file SessionState.h. References m_logonTimeout. Referenced by logonTimedOut(), and FIX::Session::setLogonTimeout().
00071 { return m_logonTimeout; }
|
|
|
Definition at line 152 of file SessionState.h. References m_logoutReason.
00153 { Locker l( m_mutex ); m_logoutReason = value; }
|
|
|
Definition at line 150 of file SessionState.h. References m_logoutReason. Referenced by FIX::Session::disconnect(), FIX::Session::logon(), FIX::Session::logout(), and FIX::Session::next().
00151 { Locker l( m_mutex ); return m_logoutReason; }
|
|
|
Definition at line 122 of file SessionState.h. References lastSentTime(), logoutTimeout(), and sentLogout(). Referenced by FIX::Session::next().
00123 {
00124 UtcTimeStamp now;
00125 return sentLogout() && ( ( now - lastSentTime() ) >= logoutTimeout() );
00126 }
|
|
|
Definition at line 75 of file SessionState.h. References m_logoutTimeout.
00075 { m_logoutTimeout = value; }
|
|
|
Definition at line 74 of file SessionState.h. References m_logoutTimeout. Referenced by logoutTimedOut(), and FIX::Session::setLogoutTimeout().
00074 { return m_logoutTimeout; }
|
|
|
Definition at line 138 of file SessionState.h. References heartBtInt(), lastSentTime(), and testRequest(). Referenced by FIX::Session::next().
00139 {
00140 UtcTimeStamp now;
00141 return ( ( now - lastSentTime() ) >= heartBtInt() ) && !testRequest();
00142 }
|
|
|
Definition at line 143 of file SessionState.h. References heartBtInt(), lastReceivedTime(), and testRequest(). Referenced by FIX::Session::next().
00144 {
00145 UtcTimeStamp now;
00146 return ( now - lastReceivedTime() ) >=
00147 ( ( 1.2 * ( ( double ) testRequest() + 1 ) ) * ( double ) heartBtInt() );
00148 }
|
|
|
|
Implements FIX::Log. Definition at line 198 of file SessionState.h. References FIX::Log::onIncoming(). Referenced by FIX::Session::next().
|
|
|
Implements FIX::Log. Definition at line 200 of file SessionState.h. References FIX::Log::onOutgoing(). Referenced by FIX::Session::send().
|
|
||||||||||||
|
Definition at line 155 of file SessionState.h. Referenced by FIX::Session::doTargetTooHigh().
00156 { Locker l( m_mutex ); m_queue[ msgSeqNum ] = message; }
|
|
|
Definition at line 54 of file SessionState.h. References m_receivedLogon.
00054 { m_receivedLogon = value; }
|
|
|
Definition at line 53 of file SessionState.h. References m_receivedLogon. Referenced by FIX::Session::disconnect(), FIX::Session::generateReject(), FIX::Session::next(), FIX::Session::nextLogon(), FIX::Session::receivedLogon(), and FIX::Session::validLogonState().
00053 { return m_receivedLogon; }
|
|
|
Definition at line 63 of file SessionState.h. References m_receivedReset.
00063 { m_receivedReset = value; }
|
|
|
Definition at line 62 of file SessionState.h. References m_receivedReset. Referenced by FIX::Session::disconnect(), FIX::Session::generateLogon(), FIX::Session::nextLogon(), FIX::Session::sendRaw(), and FIX::Session::validLogonState().
00062 { return m_receivedReset; }
|
|
|
Implements FIX::MessageStore. Definition at line 193 of file SessionState.h. References FIX::MessageStore::refresh(). Referenced by FIX::Session::refresh().
00194 { Locker l( m_mutex ); m_pStore->refresh(); }
|
|
||||||||||||
|
Definition at line 86 of file SessionState.h. References m_resendRange.
00087 { m_resendRange = std::make_pair( begin, end ); }
|
|
|
Definition at line 85 of file SessionState.h. References m_resendRange, and ResendRange. Referenced by FIX::Session::disconnect(), FIX::Session::doTargetTooHigh(), FIX::Session::generateResendRequest(), and FIX::Session::verify().
00085 { return m_resendRange; }
|
|
|
Definition at line 80 of file SessionState.h. References m_resendRange. Referenced by FIX::Session::doTargetTooHigh(), and FIX::Session::verify().
00081 { return !(m_resendRange.first == 0 && m_resendRange.second == 0); }
|
|
|
Implements FIX::MessageStore. Definition at line 191 of file SessionState.h. References FIX::MessageStore::reset(). Referenced by FIX::Session::disconnect(), FIX::Session::generateLogon(), FIX::Session::nextLogon(), FIX::Session::nextLogout(), FIX::Session::reset(), and FIX::Session::sendRaw().
00192 { Locker l( m_mutex ); m_pStore->reset(); }
|
|
||||||||||||
|
Definition at line 157 of file SessionState.h. Referenced by FIX::Session::nextQueued().
|
|
|
Definition at line 60 of file SessionState.h. References m_sentLogon.
00060 { m_sentLogon = value; }
|
|
|
Definition at line 59 of file SessionState.h. References m_sentLogon. Referenced by alreadySentLogon(), FIX::Session::disconnect(), FIX::Session::generateLogon(), FIX::Session::sentLogon(), shouldSendLogon(), and FIX::Session::validLogonState().
00059 { return m_sentLogon; }
|
|
|
Definition at line 57 of file SessionState.h. References m_sentLogout.
00057 { m_sentLogout = value; }
|
|
|
Definition at line 56 of file SessionState.h. References m_sentLogout. Referenced by FIX::Session::disconnect(), FIX::Session::generateLogout(), logoutTimedOut(), FIX::Session::next(), FIX::Session::nextLogout(), FIX::Session::sentLogout(), and FIX::Session::validLogonState().
00056 { return m_sentLogout; }
|
|
|
Definition at line 66 of file SessionState.h. References m_sentReset.
00066 { m_sentReset = value; }
|
|
|
Definition at line 65 of file SessionState.h. References m_sentReset. Referenced by FIX::Session::disconnect(), FIX::Session::nextLogon(), FIX::Session::sendRaw(), and FIX::Session::validLogonState().
00065 { return m_sentReset; }
|
|
||||||||||||
|
Implements FIX::MessageStore. Definition at line 172 of file SessionState.h. References FIX::MessageStore::set(). Referenced by FIX::Session::sendRaw().
00173 { Locker l( m_mutex ); return m_pStore->set( s, m ); }
|
|
|
Implements FIX::MessageStore. Definition at line 181 of file SessionState.h. References FIX::MessageStore::setNextSenderMsgSeqNum(). Referenced by FIX::Session::setNextSenderMsgSeqNum().
00182 { Locker l( m_mutex ); m_pStore->setNextSenderMsgSeqNum( n ); }
|
|
|
Implements FIX::MessageStore. Definition at line 183 of file SessionState.h. References FIX::MessageStore::setNextTargetMsgSeqNum(). Referenced by FIX::Session::nextSequenceReset(), and FIX::Session::setNextTargetMsgSeqNum().
00184 { Locker l( m_mutex ); m_pStore->setNextTargetMsgSeqNum( n ); }
|
|
|
Definition at line 115 of file SessionState.h. References initiate(), and sentLogon(). Referenced by FIX::Session::next(), and FIX::Session::nextLogon().
|
|
|
Definition at line 90 of file SessionState.h.
00090 { m_pStore = pValue; }
|
|
|
Definition at line 89 of file SessionState.h. Referenced by FIX::Session::Session(), and FIX::Session::~Session().
00089 { return m_pStore; }
|
|
|
Definition at line 78 of file SessionState.h. References m_testRequest.
00078 { m_testRequest = value; }
|
|
|
Definition at line 77 of file SessionState.h. References m_testRequest. Referenced by FIX::Session::generateLogon(), needHeartbeat(), needTestRequest(), FIX::Session::next(), and FIX::Session::verify().
00077 { return m_testRequest; }
|
|
|
Definition at line 133 of file SessionState.h. References heartBtInt(), and lastReceivedTime(). Referenced by FIX::Session::next().
00134 {
00135 UtcTimeStamp now;
00136 return ( now - lastReceivedTime() ) >= ( 2.4 * ( double ) heartBtInt() );
00137 }
|
|
|
Definition at line 127 of file SessionState.h. References heartBtInt(), lastReceivedTime(), and lastSentTime(). Referenced by FIX::Session::next().
00128 {
00129 UtcTimeStamp now;
00130 return ( ( now - lastSentTime() ) < heartBtInt() ) &&
00131 ( ( now - lastReceivedTime() ) < heartBtInt() );
00132 }
|
|
|
Definition at line 206 of file SessionState.h. Referenced by enabled(), and SessionState(). |
|
|
Definition at line 217 of file SessionState.h. Referenced by heartBtInt(). |
|
|
Definition at line 212 of file SessionState.h. Referenced by initiate(), and SessionState(). |
|