CBOE CMi2 Trading Handler. More...
Public Member Functions | |
Handler (const HandlerSettings &settings) | |
Performs instance initialization. More... | |
void | connect (const std::string &hostName, UInt16 port, const Logon &logon, const std::string &localNetworkInterface="") |
Establishes the connection. More... | |
void | disconnect () |
Force session disconnect. More... | |
void | disconnectAsync () |
Async force session disconnect. More... | |
UInt32 | send (Message &, bool warmupMode=false) |
Send message. More... | |
UInt32 | send (SerializedMessage &) |
Send message. More... | |
void | nextSendingSeqNum (UInt32 value) |
Sets the next sequence number for sending messages. More... | |
void | registerErrorListener (ErrorListener *listener) |
Assigns listener for errors occurred while executing handler. More... | |
void | registerWarningListener (WarningListener *listener) |
Assigns listener for warnings occurred while executing handler. More... | |
void | registerHandlerStateListener (HandlerStateListener *listener) |
Assigns listener for state change events occurred while executing handler. More... | |
void | registerSessionListener (SessionListener *listener) |
Assigns listener for session events occurred while executing handler. More... | |
void | registerAdminMessageListener (AdminMessageListener *listener) |
Assigns listener for administrative events. More... | |
void | registerMessageListener (MessageListener *listener) |
Assigns listener for exchange events. More... | |
HandlerState::Enum | state () const |
Returns handler state. More... | |
UInt32 | outboundQueueBytes () |
return outbound queue size More... | |
void | log (LogLevel::Enum logLevel, const char *logMessage, size_t length) |
Logs the given user-level message to the handler log. More... | |
void | log (LogLevel::Enum logLevel, const char *logMessage) |
Logs the given user-level message to the handler log. More... | |
void | log (LogLevel::Enum logLevel, const std::string &str) |
Logs the given user-level message to the handler log. More... | |
UInt32 | userSessionKey () const |
Returns CMi2 user session key for the most recent successful connection. More... | |
const std::string & | licenseExpirationDate () const |
Returns the license expiration date. More... | |
Static Public Member Functions | |
static const std::string & | version () |
Returns Handler's version. More... | |
CBOE CMi2 Trading Handler.
Handler | ( | const HandlerSettings & | settings | ) |
Performs instance initialization.
settings | defines values for various options which affect handler behavior like enabling logging during execution of the handler. |
void connect | ( | const std::string & | hostName, |
UInt16 | port, | ||
const Logon & | logon, | ||
const std::string & | localNetworkInterface = "" |
||
) |
Establishes the connection.
hostName | Hostname to connect to. |
port | Port number to connect to. |
logon | Initial logon message parameters. |
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. |
void disconnect | ( | ) |
Force session disconnect.
void disconnectAsync | ( | ) |
Async force session disconnect.
const std::string& licenseExpirationDate | ( | ) | const |
Returns the license expiration date.
void log | ( | LogLevel::Enum | logLevel, |
const char * | logMessage, | ||
size_t | length | ||
) |
Logs the given user-level message to the handler log.
void log | ( | LogLevel::Enum | logLevel, |
const char * | logMessage | ||
) |
Logs the given user-level message to the handler log.
void log | ( | LogLevel::Enum | logLevel, |
const std::string & | str | ||
) |
Logs the given user-level message to the handler log.
void nextSendingSeqNum | ( | UInt32 | value | ) |
Sets the next sequence number for sending messages.
UInt32 outboundQueueBytes | ( | ) |
return outbound queue size
void registerAdminMessageListener | ( | AdminMessageListener * | listener | ) |
Assigns listener for administrative events.
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. |
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 |
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. |
void registerMessageListener | ( | MessageListener * | listener | ) |
Assigns listener for exchange events.
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. |
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. |
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 |
UInt32 send | ( | Message & | , |
bool | warmupMode = false |
||
) |
Send message.
OperationException | Attempt to send data before connection creation |
std::exception | with system dependent message if sending has been failed |
UInt32 send | ( | SerializedMessage & | ) |
Send message.
OperationException | Attempt to send data before connection creation |
std::exception | with system dependent message if sending has been failed |
HandlerState::Enum state | ( | ) | const |
Returns handler state.
UInt32 userSessionKey | ( | ) | const |
Returns CMi2 user session key for the most recent successful connection.
|
static |
Returns Handler's version.