23 #include <logging/LogFacility.h> 24 #include <licensing/LicenseChecker.h> 26 #include <OnixS/HandlerCore/HandlerLogger.h> 28 #include <OnixS/ItchCore/SoupBinTCP/ReconnectableSession.h> 42 class OutgoingMessage;
48 class AuditTrailDumper;
52 public Licensing::LicenseChecker,
53 public OnixS::Logging::LogFacility,
54 private OnixS::ItchCore::SoupBinTCP::ReconnectableSessionListener
56 typedef Logging::LogFacility base;
64 template <
typename TMsg>
65 void log (
const TMsg & msg) { logger_->log (msg); }
67 template <
typename TMsg>
68 void forceLog (
const TMsg & msg) { logger_->getLogger().forceLog (msg); }
70 void commonLog (
int logLevel,
const char * msg,
size_t length);
75 const std::string& hostName,
77 const std::string& localNetworkInterface);
92 void onError(OnixS::ItchCore::SoupBinTCP::ReconnectableSession&,
const std::string&)
final;
93 void onWarning(OnixS::ItchCore::SoupBinTCP::ReconnectableSession&,
const std::string&)
final;
94 void onStateChange(OnixS::ItchCore::SoupBinTCP::ReconnectableSession&,
95 OnixS::ItchCore::SoupBinTCP::ReconnectableSessionState::Enum oldState,
96 OnixS::ItchCore::SoupBinTCP::ReconnectableSessionState::Enum newState)
final;
97 void onData(OnixS::ItchCore::SoupBinTCP::ReconnectableSession&,
const void* data, UInt16 size)
final;
99 void processData(
const void* dataPtr, UInt16 messageLength);
106 boost::scoped_ptr<OnixS::HandlerCore::Common::HandlerLogger>
const logger_;
107 boost::scoped_ptr<ListenerHolder>
const listenerHolder_;
108 boost::scoped_ptr<AuditTrailDumper> auditTrailDumper_;
110 mutable HandlerCore::MarketData::FE::AtomicState<HandlerState::Enum> externalState_;
111 boost::scoped_ptr<OnixS::ItchCore::SoupBinTCP::ReconnectableSession> session_;
114 typedef OnixS::Concurrency::RecursiveMutex Mutex;
115 typedef OnixS::Concurrency::Guard<OnixS::Concurrency::Mutex> Guard;
117 mutable Mutex sessionLock_;
void connect(const LogonSettings &logonSettings, const std::string &hostName, UInt16 port, const std::string &localNetworkInterface)
Implementation::HandlerImpl base
void send(const OutgoingMessage &message, bool warmupMode=false)
std::string sessionId() const
Enum
Defines the state that the handler is in.
Impl(const HandlerSettings &settings)
UInt64 nextExpectedSequenceNumber() const
HandlerImpl(const HandlerSettings &settings)
void log(const TMsg &msg)
void commonLog(int logLevel, const char *msg, size_t length)
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_END
void forceLog(const TMsg &msg)
ListenerHolder * listenerHolder()
HandlerState::Enum getState()