OnixS BME SENAF Handler C++ library  2.3.0
API documentation
Handler Class Reference

#include <OnixS/Senaf/MarketData/Handler.h>

Public Member Functions

 Handler (const HandlerSettings &handlerSettings)
 
virtual ~Handler ()
 
std::string licenseExpirationDate () const
 
void logDebug (const std::string &message)
 
void logError (const std::string &message)
 
void logMessage (const std::string &message)
 
void logWarning (const std::string &message)
 
void registerErrorListener (ErrorListener *listener)
 
void registerWarningListener (WarningListener *listener)
 
void registerHandlerStateChangeListener (HandlerStateChangeListener *listener)
 
void registerLogReplayListener (LogReplayListener *listener)
 
void registerReferenceListener (ReferenceListener *listener)
 
void registerSecurityDbListener (SecurityDbListener *listener)
 
void registerMarketPublicationListener (MarketPublicationListener *listener)
 
void registerMarketControlListener (MarketControlListener *listener)
 
void registerOrderBookUpdateListener (OrderBookUpdateListener *listener)
 
void registerPrivateManagementListener (PrivateManagementListener *listener)
 
void subscribe (const MarketSubscription &subscription)
 
void start ()
 
void stop ()
 
HandlerStates::Enum state () const
 

Static Public Member Functions

static const std::string & version ()
 

Detailed Description

The Handler class is responsible for connecting to the BME SENAF Financial Asset Electronic Trading System, processing exchange events, and notifying user code through callbacks. It ensures efficient handling of market data, logging, and listener registration, providing a robust interface for interacting with the exchange's data feed.

Definition at line 48 of file Handler.h.

Constructor & Destructor Documentation

Handler ( const HandlerSettings handlerSettings)

Performs instance initialization.

Parameters
handlerSettingsdefines values for various settings which affect handler behavior like enabling logging during execution of the handler.
virtual ~Handler ( )
virtual

Finalizes the Handler.

Member Function Documentation

std::string licenseExpirationDate ( ) const

Retrieves the expiration date of the Handler's license.

This method returns a string representing the date when the Handler's license will expire. The expiration date is provided in the format "YYYYMMDD", where:

  • YYYY represents the four-digit year,
  • MM represents the two-digit month,
  • DD represents the two-digit day.

This information is useful for ensuring that the Handler's license remains valid and for tracking when renewal is required.

Returns
A string containing the license expiration date in "YYYYMMDD" format.
void logDebug ( const std::string &  message)

Logs a debug message for diagnostic purposes.

This method records a debug-level message to the logging system, which can be useful for tracking application behavior and troubleshooting. It is safe to call this method from any thread.

Parameters
messageThe debug message to be logged.
void logError ( const std::string &  message)

Logs an error message to the logging system.

This method records an error-level message, which can be critical for monitoring application health and diagnosing issues. It is safe to call this method from any thread.

Parameters
messageThe error message to be logged, providing context for the issue.
void logMessage ( const std::string &  message)

Logs an informational message to the logging system.

This method records an informational-level message, which can be useful for general application logging and monitoring. It is safe to call this method from any thread.

Parameters
messageThe informational message to be logged.
void logWarning ( const std::string &  message)

Logs a warning message to the logging system.

This method records a warning-level message, which can be useful for highlighting potential issues or unusual conditions in the application. It is safe to call this method from any thread.

Parameters
messageThe warning message to be logged.
void registerErrorListener ( ErrorListener listener)

Registers the error listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerHandlerStateChangeListener ( HandlerStateChangeListener listener)

Registers the Handler state change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerLogReplayListener ( LogReplayListener listener)

Registers the log replay listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerMarketControlListener ( MarketControlListener listener)

Registers the Market Control Messages listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerMarketPublicationListener ( MarketPublicationListener listener)

Registers the Market Publication Messages listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerOrderBookUpdateListener ( OrderBookUpdateListener listener)

Registers the order book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerPrivateManagementListener ( PrivateManagementListener listener)

Registers the Private Management Messages listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerReferenceListener ( ReferenceListener listener)

Registers the Reference listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerSecurityDbListener ( SecurityDbListener listener)

Registers the Security DB listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void registerWarningListener ( WarningListener listener)

Registers the warning listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.
void start ( )

Starts the Handler.

Exceptions
exceptionin case of unable to establish TCP connection.
HandlerStates::Enum state ( ) const

Retrieves the current state of the Handler.

This method is safe for concurrent access across multiple threads.

Returns
The current state of the Handler that indicates the Handler's operational status.
void stop ( )

Stops the Handler.

void subscribe ( const MarketSubscription subscription)

Subscribes to market data updates based on the provided subscription details.

This method registers the specified market subscription, allowing the Handler to receive updates related to the market events specified in the subscription. It is safe to call this method from any thread.

Parameters
subscriptionThe details of the market subscription to be registered.
static const std::string& version ( )
static

Retrieves the version of the Handler.

This method returns a constant reference to a string representing the version of the Handler in the format "X.Y.Z". The version information is useful for tracking the Handler's release or update state in the system.

Returns
A constant reference to a string containing the version of the Handler.

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