All Handler's constructors accept instance of corresponding handler's settings class which defines values of various parameters for determination Handler's behavior. Role of the most important parameters that used in regular cases is described below.
By default, all important aspects of handler's activity are logged. Therefore, the handler must know where this kind of information can be stored on a local file system. The OnixS::Brokertec::MarketData::Itch::HandlerSettings::logDirectory parameter needs to be defined for pointing the handler's place where log files can be stored.
To run a handler's instance, it is required to have a license file. When the instance is not able to find a valid license, it throws an exception at the initialization stage.
OnixS::Brokertec::MarketData::Itch::HandlerSettings contains OnixS::Brokertec::MarketData::Itch::HandlerSettings::licenseDirectory member which contains path to directory containing license file(s). If it's value is empty, the handler looks for the license file in current directory.
The following example demonstrates how to setup primary settings for OnixS::Brokertec::MarketData::Itch::Handler:
// Create an instance handler's settings. OnixS::Brokertec::MarketData::Itch::HandlerSettings handlerSettings; // This option is used to control verbosity of logger. settings.logLevel = OnixS::Brokertec::MarketData::Itch::LogLevel::Debug; // This option is used to specify extra logger settings. settings.logSettings = OnixS::Brokertec::MarketData::Itch::LogSettings::Default; // Logs will be stored in 'logs' local sub folder. settings.logDirectory = "logs"; // This option is used to instruct the Handler where to look for a valid license. settings.licenseDirectory = "../../license"; // Set up IP addresses and port numbers for multicast feeds handlerSettings.useFeedA = true; handlerSettings.useFeedB = true; handlerSettings.multicastFeed.serviceA.address = "194.169.8.210"; handlerSettings.multicastFeed.serviceA.port = 53032; handlerSettings.multicastFeed.serviceB.address = "194.169.8.211"; handlerSettings.multicastFeed.serviceB.port = 54033; handlerSettings.retransmitionServer.address = "194.169.8.212"; handlerSettings.retransmitionServer.port = 54034; OnixS::Brokertec::MarketData::Itch::Handler handler (settings);