OnixS C++ SGX Titan OUCH Trading Handler  1.2.0
API documentation
Handler Class Reference

#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 ()
 

Detailed Description

Definition at line 42 of file Handler.h.

Constructor & Destructor Documentation

Handler ( const HandlerSettings settings)
explicit

Performs instance initialization.

Parameters
settingsdefines values for various options which affect handler behavior like enabling logging during execution of the handler.

Definition at line 28 of file Handler.cpp.

~Handler ( )
virtual

Definition at line 33 of file Handler.cpp.

Member Function Documentation

void connect ( const LogonSettings logonSettings,
const std::string &  hostName,
UInt16  port,
const std::string &  localNetworkInterface = "" 
)

Establishes the connection.

Note
Blocks until the logon reply is received.
Should be called only when Handler is disconnected.
Parameters
logonSettingsInitial logon message parameters.
hostNameHostname to connect to.
portPort number to connect to.
localNetworkInterfaceLocal network interface.
Exceptions
std::exceptionCannot set the local network interface.
std::exceptionCannot connect to hostname on port.
std::exceptionCannot configure size of receive buffer for the socket.
std::exceptionCannot configure size of send buffer for the socket.
OperationExceptionInvalid argument is given.

Definition at line 38 of file Handler.cpp.

void disconnect ( )

Force session disconnect.

Note
Blocks until the Session Logout procedure is finished.

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.

Exceptions
OperationExceptionif 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.

Exceptions
OperationExceptionif 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.

Exceptions
OperationExceptionif 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.

Exceptions
OperationExceptionif 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.

Exceptions
OperationExceptionif 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.

const std::string version ( )
static

Returns Handler's version.

Definition at line 129 of file Handler.cpp.


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