#include <OnixS/SgxTitan/Trading/OUCH/Handler.h>
Classes | |
struct | Impl |
Public Member Functions | |
Handler (const HandlerSettings &settings) | |
virtual | ~Handler () |
void | connect (const LogonSettings &logonSettings, const std::string &hostName, UInt16 port, const std::string &localNetworkInterface="") |
void | disconnect () |
void | disconnectAsync () |
void | registerErrorListener (ErrorListener *listener) |
void | registerWarningListener (WarningListener *listener) |
void | registerHandlerStateListener (HandlerStateListener *listener) |
void | registerSessionListener (SessionListener *listener) |
void | registerMessageListener (MessageListener *listener) |
void | send (const OutgoingMessage &) |
UInt64 | nextExpectedSequenceNumber () const |
std::string | sessionId () const |
HandlerState::Enum | state () const |
void | log (LogLevel::Enum logLevel, const char *logMessage, size_t length) |
void | log (LogLevel::Enum logLevel, const char *logMessage) |
void | log (LogLevel::Enum logLevel, const std::string &str) |
const std::string & | licenseExpirationDate () const |
Static Public Member Functions | |
static const std::string | version () |
|
explicit |
Performs instance initialization.
settings | defines values for various options which affect handler behavior like enabling logging during execution of the handler. |
Definition at line 28 of file Handler.cpp.
|
virtual |
Definition at line 33 of file Handler.cpp.
void connect | ( | const LogonSettings & | logonSettings, |
const std::string & | hostName, | ||
UInt16 | port, | ||
const std::string & | localNetworkInterface = "" |
||
) |
Establishes the connection.
logonSettings | Initial logon message parameters. |
hostName | Hostname to connect to. |
port | Port number to connect to. |
localNetworkInterface | Local network interface. |
std::exception | Cannot set the local network interface. |
std::exception | Cannot connect to hostname on port. |
std::exception | Cannot configure size of receive buffer for the socket. |
std::exception | Cannot configure size of send buffer for the socket. |
OperationException | Invalid argument is given. |
Definition at line 38 of file Handler.cpp.
void disconnect | ( | ) |
Force session disconnect.
Definition at line 46 of file Handler.cpp.
void disconnectAsync | ( | ) |
Async force session disconnect.
Definition at line 51 of file Handler.cpp.
const std::string & licenseExpirationDate | ( | ) | const |
Returns the license expiration date.
Definition at line 124 of file Handler.cpp.
void log | ( | LogLevel::Enum | logLevel, |
const char * | logMessage, | ||
size_t | length | ||
) |
Logs the given user-level message to the handler log.
Definition at line 105 of file Handler.cpp.
void log | ( | LogLevel::Enum | logLevel, |
const char * | logMessage | ||
) |
Logs the given user-level message to the handler log
Definition at line 110 of file Handler.cpp.
void log | ( | LogLevel::Enum | logLevel, |
const std::string & | str | ||
) |
Logs the given user-level message to the handler log.
Definition at line 115 of file Handler.cpp.
UInt64 nextExpectedSequenceNumber | ( | ) | const |
The next Sequenced Message number to be sent by the exchange.
Definition at line 61 of file Handler.cpp.
void registerErrorListener | ( | ErrorListener * | listener | ) |
Assigns listener for errors occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.
OperationException | if handler not disconnected |
Definition at line 66 of file Handler.cpp.
void registerHandlerStateListener | ( | HandlerStateListener * | listener | ) |
Assigns listener for state change events occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.
OperationException | if handler not disconnected. |
Definition at line 76 of file Handler.cpp.
void registerMessageListener | ( | MessageListener * | listener | ) |
Assigns listener for message events occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.
OperationException | if handler not disconnected. |
Definition at line 86 of file Handler.cpp.
void registerSessionListener | ( | SessionListener * | listener | ) |
Assigns listener for session events occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.
OperationException | if handler not disconnected. |
Definition at line 81 of file Handler.cpp.
void registerWarningListener | ( | WarningListener * | listener | ) |
Assigns listener for warnings occurred while executing handler. It's permissible to change the listener multiple times during handler's life-time, but only when handler is in disconnected state.
OperationException | if handler not disconnected |
Definition at line 71 of file Handler.cpp.
void send | ( | const OutgoingMessage & | message | ) |
Definition at line 56 of file Handler.cpp.
std::string sessionId | ( | ) | const |
session id
Definition at line 96 of file Handler.cpp.
HandlerState::Enum state | ( | ) | const |
Returns handler state.
Definition at line 91 of file Handler.cpp.
|
static |
Returns Handler's version.
Definition at line 129 of file Handler.cpp.