OnixS C++ MTS Bond Vision SDP Handler 1.3.0
API documentation
Loading...
Searching...
No Matches
Handler Class Reference

Public Member Functions

 Handler (const HandlerSettings &settings)
virtual ~Handler ()
void connect (const ConnectionSettings &connectionSettings, const LogonSettings &logonSettings, const std::string &hostName, UInt16 port, const std::string &localNetworkInterface="")
void disconnect ()
void disconnectAsync ()
void replay (const ReplayOptions &options)
void requestAddressServiceInformation ()
void subscribe (ClassId::Enum classId, SubscribeType::Enum subscribeType=SubscribeType::All)
void subscribeFiltered (ClassId::Enum classId, UInt32 filterKey, SubscribeType::Enum subscribeType=SubscribeType::All)
void unsubscribe (ClassId::Enum classId)
UInt32 act (ActionType::Enum actionType, Class *msg, bool dataInResponse=false)
UInt32 addFilter (UInt32 filterId, const std::string &value)
void registerErrorListener (ErrorListener *listener)
void registerWarningListener (WarningListener *listener)
void registerHandlerStateListener (HandlerStateListener *listener)
void registerSessionListener (SessionListener *listener)
void registerServiceAddressInformationListener (ServiceAddressInformationListener *listener)
void registerAdminMessageListener (AdminMessageListener *listener)
void registerClassListener (ClassListener *listener)
void registerActResultListener (ActResultListener *listener)
void registerSubscriptionListener (SubscriptionListener *listener)
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

OnixS MTS BonVision/SDP Handler

Definition at line 38 of file Handler.h.

Constructor & Destructor Documentation

◆ Handler()

Handler ( const HandlerSettings & settings)

Performs instance initialization.

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

◆ ~Handler()

virtual ~Handler ( )
virtual

Member Function Documentation

◆ act()

UInt32 act ( ActionType::Enum actionType,
Class * msg,
bool dataInResponse = false )

perform action

Parameters

throws OperationException Attempt to send data before connection creation

Exceptions
std::exceptionwith system dependent message if requesting has been failed

◆ addFilter()

UInt32 addFilter ( UInt32 filterId,
const std::string & value )

add filter return filter key

◆ connect()

void connect ( const ConnectionSettings & connectionSettings,
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
hostNameHostname to connect to.
portPort number to connect to.
logonInitial logon message parameters.
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.

◆ disconnect()

void disconnect ( )

Force session disconnect.

Note
Blocks until the Session Logout procedure is finished.

◆ disconnectAsync()

void disconnectAsync ( )

Async force session disconnect.

◆ licenseExpirationDate()

const std::string & licenseExpirationDate ( ) const

Returns the license expiration date.

◆ log() [1/3]

void log ( LogLevel::Enum logLevel,
const char * logMessage )

Logs the given user-level message to the handler log

◆ log() [2/3]

void log ( LogLevel::Enum logLevel,
const char * logMessage,
size_t length )

Logs the given user-level message to the handler log.

◆ log() [3/3]

void log ( LogLevel::Enum logLevel,
const std::string & str )

Logs the given user-level message to the handler log.

◆ registerActResultListener()

void registerActResultListener ( ActResultListener * listener)

Assigns listener for action result events. 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.

◆ registerAdminMessageListener()

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.

Exceptions
OperationExceptionif handler not disconnected.

◆ registerClassListener()

void registerClassListener ( ClassListener * 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.

Exceptions
OperationExceptionif handler not disconnected.

◆ registerErrorListener()

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

◆ registerHandlerStateListener()

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.

◆ registerServiceAddressInformationListener()

void registerServiceAddressInformationListener ( ServiceAddressInformationListener * listener)

Assigns listener for notification abaout address service information. 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.

◆ registerSessionListener()

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.

◆ registerSubscriptionListener()

void registerSubscriptionListener ( SubscriptionListener * listener)

Assigns listener for action result events. 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.

◆ registerWarningListener()

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

◆ replay()

void replay ( const ReplayOptions & options)

Replays previously logged data.

◆ requestAddressServiceInformation()

void requestAddressServiceInformation ( )

Request address service information

Note
The requested information will be provided by ServiceAddressInformationListener::onServiceAddressInformation callback.
Exceptions
OperationExceptionAttempt to send data before connection creation
std::exceptionwith system dependent message if requesting has been failed

◆ state()

HandlerState::Enum state ( ) const

Returns handler state.

◆ subscribe()

void subscribe ( ClassId::Enum classId,
SubscribeType::Enum subscribeType = SubscribeType::All )

subscribe to market information

Parameters
classIdClassId to subscribe to.
Note
The subscribed information will be provided by corresponding callbacks.
Exceptions
OperationExceptionAttempt to send data before connection creation
std::exceptionwith system dependent message if requesting has been failed

◆ subscribeFiltered()

void subscribeFiltered ( ClassId::Enum classId,
UInt32 filterKey,
SubscribeType::Enum subscribeType = SubscribeType::All )

subscribe to market information with filter

◆ unsubscribe()

void unsubscribe ( ClassId::Enum classId)

unsubscribe from market information

Parameters
classIdClassId to unsubscribe from.
Exceptions
OperationExceptionAttempt to send data before connection creation
std::exceptionwith system dependent message if requesting has been failed

◆ version()

const std::string version ( )
static

Returns Handler's version.