BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
fix::FixSessionManager Class Reference

#include <FixSessionManager.h>

Collaboration diagram for fix::FixSessionManager:
Collaboration graph

Public Member Functions

 FixSessionManager (::data::SequenceRepository *seqRepo=nullptr)
 
bool authenticate (uint32_t sessionId, const std::string &senderCompId)
 
void cleanupConnection (uint32_t sessionId)
 
std::unordered_map< std::string, SessionStategetAllSessionStates () const
 Returns a thread-safe snapshot of all session states.
 
std::mutex & getMutex ()
 Returns a reference to the internal mutex for external synchronization.
 
SessionStategetSessionState (uint32_t sessionId)
 
void handleLogout (uint32_t sessionId)
 
void incrementOutboundSequence (uint32_t sessionId)
 Increments the outbound sequence number without returning it.
 
void loadConfig (const std::vector< std::string > &validClients)
 
uint32_t useNextOutboundSequence (uint32_t sessionId)
 Increments and persists the outbound sequence number.
 
bool validateSequence (uint32_t sessionId, uint32_t incomingSeqNum)
 

Private Attributes

std::unordered_map< uint32_t, std::string > mConnectionToCompId
 
std::mutex mMutex
 
::data::SequenceRepositorymSeqRepo
 
std::unordered_map< std::string, SessionStatemSessionStates
 
std::unordered_map< std::string, bool > mValidClients
 

Constructor & Destructor Documentation

◆ FixSessionManager()

fix::FixSessionManager::FixSessionManager ( ::data::SequenceRepository seqRepo = nullptr)

Member Function Documentation

◆ authenticate()

bool fix::FixSessionManager::authenticate ( uint32_t  sessionId,
const std::string &  senderCompId 
)
Here is the call graph for this function:

◆ cleanupConnection()

void fix::FixSessionManager::cleanupConnection ( uint32_t  sessionId)

◆ getAllSessionStates()

std::unordered_map< std::string, SessionState > fix::FixSessionManager::getAllSessionStates ( ) const

Returns a thread-safe snapshot of all session states.

Here is the caller graph for this function:

◆ getMutex()

std::mutex & fix::FixSessionManager::getMutex ( )
inline

Returns a reference to the internal mutex for external synchronization.

Here is the caller graph for this function:

◆ getSessionState()

SessionState * fix::FixSessionManager::getSessionState ( uint32_t  sessionId)

◆ handleLogout()

void fix::FixSessionManager::handleLogout ( uint32_t  sessionId)

◆ incrementOutboundSequence()

void fix::FixSessionManager::incrementOutboundSequence ( uint32_t  sessionId)

Increments the outbound sequence number without returning it.

Here is the call graph for this function:

◆ loadConfig()

void fix::FixSessionManager::loadConfig ( const std::vector< std::string > &  validClients)
Here is the caller graph for this function:

◆ useNextOutboundSequence()

uint32_t fix::FixSessionManager::useNextOutboundSequence ( uint32_t  sessionId)

Increments and persists the outbound sequence number.

Returns
The sequence number to use for the message.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateSequence()

bool fix::FixSessionManager::validateSequence ( uint32_t  sessionId,
uint32_t  incomingSeqNum 
)
Here is the call graph for this function:

Member Data Documentation

◆ mConnectionToCompId

std::unordered_map<uint32_t, std::string> fix::FixSessionManager::mConnectionToCompId
private

◆ mMutex

std::mutex fix::FixSessionManager::mMutex
mutableprivate

◆ mSeqRepo

::data::SequenceRepository* fix::FixSessionManager::mSeqRepo
private

◆ mSessionStates

std::unordered_map<std::string, SessionState> fix::FixSessionManager::mSessionStates
private

◆ mValidClients

std::unordered_map<std::string, bool> fix::FixSessionManager::mValidClients
private

The documentation for this class was generated from the following files: