fix8  version 1.4.0
Open Source C++ FIX Framework
FIX8::SessionConfig Struct Reference

Base session wrapper. More...

#include <sessionwrapper.hpp>

Inheritance diagram for FIX8::SessionConfig:
FIX8::Configuration FIX8::ClientSessionBase FIX8::ServerSessionBase FIX8::ClientSession< T > FIX8::ServerSession< T > FIX8::ReliableClientSession< T >

Public Member Functions

 SessionConfig (const F8MetaCntx &ctx, const std::string &conf_file, const std::string &session_name)
 Ctor. Loads configuration, obtains session details, sets up logfile flags. More...
 
virtual ~SessionConfig ()
 Dtor. More...
 
const XmlElementget_session_element () const
 
- Public Member Functions inherited from FIX8::Configuration
const XmlElementfind_group (group_types type, const std::string &tag) const
 
 Configuration (const std::string &xmlfile, bool do_process=false)
 
 Configuration (std::istream &istr, bool do_process=false)
 
virtual ~Configuration ()
 Dtor. More...
 
F8API int process ()
 
const XmlElementget_session (const unsigned num) const
 
F8API Connection::Role get_role (const XmlElement *from) const
 
F8API size_t get_addresses (const XmlElement *from, std::vector< Server > &target) const
 
F8API Poco::Net::SocketAddress get_address (const XmlElement *from) const
 
F8API Poco::Net::IPAddress get_ip (const XmlElement *from) const
 
template<typename T >
get_logflags (const std::string &tag, const std::vector< std::string > &names, const XmlElement *from, Logger::LogPositions *positions=nullptr) const
 
F8API std::string & get_logname (const XmlElement *from, std::string &to, const SessionID *sid=nullptr) const
 
unsigned get_connect_timeout (const XmlElement *from, const unsigned def=defaults::connect_timeout) const
 
unsigned get_retry_interval (const XmlElement *from, const unsigned def=defaults::retry_interval) const
 
unsigned get_retry_count (const XmlElement *from, const int def=defaults::login_retries) const
 
unsigned get_tcp_recvbuf_sz (const XmlElement *from, const unsigned def=0) const
 
unsigned get_tcp_sendbuf_sz (const XmlElement *from, const unsigned def=0) const
 
unsigned get_version (const XmlElement *from, const unsigned def=0) const
 
unsigned get_tabsize (const XmlElement *from, const unsigned def=defaults::tabsize) const
 
unsigned get_logfile_rotation (const XmlElement *from, const unsigned def=defaults::log_rotation) const
 
unsigned get_heartbeat_interval (const XmlElement *from, const unsigned def=defaults::hb_interval) const
 
bool get_tcp_nodelay (const XmlElement *from, const bool def=true) const
 
bool get_tcp_keepalive (const XmlElement *from, const bool def=false) const
 
bool get_tcp_reuseaddr (const XmlElement *from, const bool def=false) const
 
int get_tcp_linger (const XmlElement *from, const int def=-1) const
 
bool get_silent_disconnect (const XmlElement *from, const bool def=false) const
 
bool get_enforce_compids_flag (const XmlElement *from, const bool def=true) const
 
bool get_ignore_logon_sequence_check_flag (const XmlElement *from, const bool def=false) const
 
bool get_no_chksum_flag (const XmlElement *from, const bool def=false) const
 
bool get_permissive_mode_flag (const XmlElement *from, const bool def=false) const
 
bool get_reset_sequence_number_flag (const XmlElement *from, const bool def=false) const
 
bool get_always_seqnum_assign (const XmlElement *from, const bool def=false) const
 
F8API ProcessModel get_process_model (const XmlElement *from) const
 
default_appl_ver_id get_default_appl_ver_id (const XmlElement *from) const
 
sender_comp_id get_sender_comp_id (const XmlElement *from) const
 
target_comp_id get_target_comp_id (const XmlElement *from) const
 
F8API Persistercreate_persister (const XmlElement *from, const SessionID *sid=nullptr, bool flag=false) const
 
F8API Loggercreate_logger (const XmlElement *from, const Logtype ltype, const SessionID *sid=nullptr) const
 
F8API Schedule create_schedule (const XmlElement *from) const
 
F8API Clients create_clients (const XmlElement *from) const
 
F8API Schedule create_login_schedule (const XmlElement *from) const
 
F8API Session_Schedulecreate_session_schedule (const XmlElement *from) const
 
F8API unsigned get_all_sessions (std::vector< const XmlElement * > &target, const Connection::Role role=Connection::cn_unknown) const
 
const XmlElementget_root () const
 
template<typename T >
get_logflags (const string &tag, const vector< string > &names, const XmlElement *from, Logger::LogPositions *positions) const
 

Public Attributes

const F8MetaCntx_ctx
 
const XmlElement_ses
 
LoginParameters _loginParameters
 
const std::string _session_name
 

Additional Inherited Members

- Public Types inherited from FIX8::Configuration
enum  group_types {
  g_sessions, g_persisters, g_loggers, g_server_group,
  g_ssl_context, g_schedules, g_logins, g_client_group,
  g_count
}
 
enum  Logtype { session_log, protocol_log }
 
- Protected Member Functions inherited from FIX8::Configuration
bool from_or_default (const XmlElement *from, const f8String &tag, f8String &target) const
 
template<typename T >
T & get_string_field (const XmlElement *from, const std::string &tag, T &to) const
 
Tickval::ticks get_time_field (const XmlElement *from, const std::string &tag, bool timeonly=false) const
 
template<typename T >
find_or_default (const XmlElement *from, const std::string &tag, const T def) const
 

Detailed Description

Base session wrapper.

Definition at line 126 of file sessionwrapper.hpp.

Constructor & Destructor Documentation

FIX8::SessionConfig::SessionConfig ( const F8MetaCntx ctx,
const std::string &  conf_file,
const std::string &  session_name 
)
inline

Ctor. Loads configuration, obtains session details, sets up logfile flags.

Definition at line 134 of file sessionwrapper.hpp.

References FIX8::Configuration::create_clients(), FIX8::Configuration::create_login_schedule(), FIX8::Configuration::get_always_seqnum_assign(), FIX8::Configuration::get_connect_timeout(), FIX8::Configuration::get_default_appl_ver_id(), FIX8::Configuration::get_enforce_compids_flag(), FIX8::Configuration::get_heartbeat_interval(), FIX8::Configuration::get_no_chksum_flag(), FIX8::Configuration::get_permissive_mode_flag(), FIX8::Configuration::get_reset_sequence_number_flag(), FIX8::Configuration::get_retry_count(), FIX8::Configuration::get_retry_interval(), FIX8::Configuration::get_silent_disconnect(), FIX8::Configuration::get_tabsize(), FIX8::Configuration::get_tcp_recvbuf_sz(), FIX8::Configuration::get_tcp_sendbuf_sz(), FIX8::MessageBase::set_tabsize(), and FIX8::defaults::tabsize.

134  :
135  Configuration(conf_file, true), _ctx(ctx), _ses(find_group(g_sessions, session_name)), _session_name(session_name)
136  {
137  if (!_ses)
138  throw InvalidConfiguration(session_name);
139 
141  {
151  };
152 
153  const unsigned ts(get_tabsize(_ses));
154  if (ts != defaults::tabsize) // only set if not default
156  }
bool get_permissive_mode_flag(const XmlElement *from, const bool def=false) const
LoginParameters _loginParameters
bool get_reset_sequence_number_flag(const XmlElement *from, const bool def=false) const
unsigned get_tcp_sendbuf_sz(const XmlElement *from, const unsigned def=0) const
bool get_silent_disconnect(const XmlElement *from, const bool def=false) const
unsigned get_tcp_recvbuf_sz(const XmlElement *from, const unsigned def=0) const
unsigned get_retry_interval(const XmlElement *from, const unsigned def=defaults::retry_interval) const
const F8MetaCntx & ctx()
Compiler generated metadata object, accessed through this function.
default_appl_ver_id get_default_appl_ver_id(const XmlElement *from) const
unsigned get_heartbeat_interval(const XmlElement *from, const unsigned def=defaults::hb_interval) const
unsigned get_connect_timeout(const XmlElement *from, const unsigned def=defaults::connect_timeout) const
unsigned get_tabsize(const XmlElement *from, const unsigned def=defaults::tabsize) const
static void set_tabsize(unsigned tabsize)
Definition: message.hpp:990
const F8MetaCntx & _ctx
const std::string _session_name
unsigned get_retry_count(const XmlElement *from, const int def=defaults::login_retries) const
const XmlElement * _ses
F8API Schedule create_login_schedule(const XmlElement *from) const
bool get_enforce_compids_flag(const XmlElement *from, const bool def=true) const
F8API Clients create_clients(const XmlElement *from) const
Configuration(const std::string &xmlfile, bool do_process=false)
bool get_always_seqnum_assign(const XmlElement *from, const bool def=false) const
bool get_no_chksum_flag(const XmlElement *from, const bool def=false) const
const XmlElement * find_group(group_types type, const std::string &tag) const
virtual FIX8::SessionConfig::~SessionConfig ( )
inlinevirtual

Dtor.

Definition at line 159 of file sessionwrapper.hpp.

159 {}

Member Function Documentation

const XmlElement* FIX8::SessionConfig::get_session_element ( ) const
inline

Get a pointer to the active session XmlElement to permit extraction of other XML attributes

Returns
the session element

Definition at line 163 of file sessionwrapper.hpp.

References _ses.

163 { return _ses; }
const XmlElement * _ses

Member Data Documentation

const F8MetaCntx& FIX8::SessionConfig::_ctx

Definition at line 128 of file sessionwrapper.hpp.

const std::string FIX8::SessionConfig::_session_name

Definition at line 131 of file sessionwrapper.hpp.

Referenced by main().


The documentation for this struct was generated from the following file: