OnixS EuroTLX MITCH Handler for C++  1.1.0.1
Adjusting Handler's Settings

Handler Settings

All Handler's constructors accept instance of corresponding handler's settings class which defines values of various parameters for determination Handlers' behavior. Role of the most important parameters that used in regular cases is described below.

Primary Settings

Directory for Log Files

By default, all important aspects of handler' activity is logged. Therefore the handler must know where this kind of information can be stored on a local file system. OnixS::EuroTLX::MarketData::Mitch::HandlerSettings::logDirectory parameter need be defined for pointing the handlers place where log files to be stored.

Licensing

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::EuroTLX::MarketData::Mitch::HandlerSettings contains OnixS::EuroTLX::MarketData::Mitch::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.

Note
When there is more than one license file in the license directory the most significant one is used (for example, production instead of trial if both are available).

Example

Following example demonstrates how to setup primary settings for OnixS::EuroTLX::MarketData::Mitch::Handler:

    // Create an instance handler's settings. 
    OnixS::EuroTLX::MarketData::Mitch::HandlerSettings handlerSettings;

    // This option is used to control verbosity of logger.
    settings.logLevel = OnixS::EuroTLX::MarketData::Mitch::LogLevel::Debug;

    // This option is used to specify extra logger settings.
    settings.logSettings = OnixS::EuroTLX::MarketData::Mitch::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;


    OnixS::EuroTLX::MarketData::Mitch::Handler handler (settings);