EPAM B2BITS C++ Bovespa MarketData handler  1.28.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
B2bits::MD::Engine Class Reference

#include <b2bits/engine/Engine.h>

Classes

struct  InitParameters
 

Public Member Functions

Bovespa::BovespaApplicationcreateBovespaApplication (Bovespa::BovespaApplicationParams const &params, Bovespa::BovespaApplicationListener *listener=nullptr)
 
Bovespa::BovespaApplicationcreateBovespaApplication (Bovespa::BovespaApplicationParams const &params, MarketData::DataReaderAbstract *dataReader, Bovespa::BovespaApplicationListener *listener=nullptr)
 
Mit::Application * createMitApplication (Mit::ConnectionManager *connectionManager, const std::string &configurationFilename)
 
Mit::Application * createMitApplication (Mit::ConnectionManager *connectionManager, const std::string &name, const Mit::ApplicationOptions &applicationOptions)
 
Spectra::SpectraApplication * createSpectraApplication (Spectra::SpectraApplicationParams const &params, Spectra::SpectraApplicationListener *appListener=NULL)
 
Spectra::SpectraApplication * createSpectraApplication (Spectra::SpectraApplicationParams const &params, MarketData::DataReaderAbstract *dataReader, Spectra::SpectraApplicationListener *appListener=NULL)
 
Micex::Mfix::MDApplication * createMICEXApplication (Micex::Mfix::MDApplicationParams const &params, Micex::Mfix::MDApplicationListener *appListener=nullptr)
 
Micex::Mfix::MDApplication * createMICEXApplication (Micex::Mfix::MDApplicationParams const &params, Micex::Mfix::DataReaderAbstract *dataReader, Micex::Mfix::MDApplicationListener *appListener=nullptr)
 
void backupLogFile (const std::string &backupFilePath)
 
const FAPropertiesgetProperties () const
 
LogCategory createLogCategory (const std::string &name)
 

Static Public Member Functions

static Engineinit (InitParameters const &params)
 
static Engineinit (const std::string &propertiesFileName="", const std::string &engineRoot="", const std::string &licenseKey="")
 
static Engineinit (const EngineProperties &props, const std::string &licenseKey="")
 
static Enginesingleton ()
 
static bool initialized ()
 
static void destroy ()
 

Detailed Description

MD Engine interface.

Member Function Documentation

void B2bits::MD::Engine::backupLogFile ( const std::string &  backupFilePath)

Backups engine's log file under the given name and opens a new one.

Parameters
backupFilePaththe current engine's log will be moved to this path.
Bovespa::BovespaApplication* B2bits::MD::Engine::createBovespaApplication ( Bovespa::BovespaApplicationParams const &  params,
Bovespa::BovespaApplicationListener listener = nullptr 
)

Creates instance of the Bovespa FIX/FAST adapter

Bovespa::BovespaApplication* B2bits::MD::Engine::createBovespaApplication ( Bovespa::BovespaApplicationParams const &  params,
MarketData::DataReaderAbstract *  dataReader,
Bovespa::BovespaApplicationListener listener = nullptr 
)
Note
For testing purposes only.
LogCategory B2bits::MD::Engine::createLogCategory ( const std::string &  name)

Creates log category

Micex::Mfix::MDApplication* B2bits::MD::Engine::createMICEXApplication ( Micex::Mfix::MDApplicationParams const &  params,
Micex::Mfix::MDApplicationListener *  appListener = nullptr 
)

Creates instance of the MICEX MFIX adapter It is user's responsibility to call Micex::Mfix::MDApplication::release method.

Micex::Mfix::MDApplication* B2bits::MD::Engine::createMICEXApplication ( Micex::Mfix::MDApplicationParams const &  params,
Micex::Mfix::DataReaderAbstract *  dataReader,
Micex::Mfix::MDApplicationListener *  appListener = nullptr 
)

Creates instance of the CME Globex FIX/FAST adapter It is user's responsibility to call Micex::Mfix::MDApplication::release method.

Note
For testing puproses only
Mit::Application* B2bits::MD::Engine::createMitApplication ( Mit::ConnectionManager *  connectionManager,
const std::string &  configurationFilename 
)

Creates an instance of the MilleniumIT Market Data Adapter. The application should be destroyed with Application::release(). connectionManager should stay alive until Application::release() is called. connectionManager can be 0 to create and use the default implementation.

Mit::Application* B2bits::MD::Engine::createMitApplication ( Mit::ConnectionManager *  connectionManager,
const std::string &  name,
const Mit::ApplicationOptions &  applicationOptions 
)

Creates an instance of the MilleniumIT Market Data Adapter. The application should be destroyed with Application::release(). connectionManager should stay alive until Application::release() is called. connectionManager can be 0 to create and use the default implementation.

Spectra::SpectraApplication* B2bits::MD::Engine::createSpectraApplication ( Spectra::SpectraApplicationParams const &  params,
Spectra::SpectraApplicationListener *  appListener = NULL 
)

Creates instance of the MOEX RTS SPECTRA FIX/FAST adapter It is user's responsibility to call Spectra::MDApplication::release method.

Spectra::SpectraApplication* B2bits::MD::Engine::createSpectraApplication ( Spectra::SpectraApplicationParams const &  params,
MarketData::DataReaderAbstract *  dataReader,
Spectra::SpectraApplicationListener *  appListener = NULL 
)

Creates instance of the MOEX RTS SPECTRA FIX/FAST adapter It is user's responsibility to call Spectra::MDApplication::release method.

Note
For testing puproses only
static void B2bits::MD::Engine::destroy ( )
static

Destroys the instance of this class.

Note
Must be called after the using of FIX Engine to free the allocated resources.
const FAProperties* B2bits::MD::Engine::getProperties ( ) const

Returns settings

static Engine* B2bits::MD::Engine::init ( InitParameters const &  params)
static

Initializes the Engine.

Parameters
paramsEngine parameters.
Returns
pointer to an instance of this class.
Note
Must be called before any other method of this library.
static Engine* B2bits::MD::Engine::init ( const std::string &  propertiesFileName = "",
const std::string &  engineRoot = "",
const std::string &  licenseKey = "" 
)
static

Initializes the Engine.

Parameters
propertiesFileNamethe FIX Engine configuration parameters file name. If it is equal to "", then "./engine.properties" is used.
engineRootThe top of the directory tree under which the engine's configuration, and log files are kept. Do NOT add a slash at the end of the directory path. Overrides the value from the properties file. If it is equal to "", then the value from the properties file is used.
licenseKeyLicense key
Returns
pointer to an instance of this class.
static Engine* B2bits::MD::Engine::init ( const EngineProperties props,
const std::string &  licenseKey = "" 
)
static

Initializes the Engine.

Parameters
propsEngine parameters. List of parameters can be find in the B2BITS_FAProperties.h file.
licenseKeyLicense key
Returns
pointer to an instance of this class.
Note
Must be called before any other method of this library.
See Also
Utils::Log::LogSystem
static bool B2bits::MD::Engine::initialized ( )
static

Returns true if Engine was initialized; false otherwise.

static Engine* B2bits::MD::Engine::singleton ( )
static

Returns an instance of this class.

Returns
pointer to an instance of this class.
See Also
init()