#include <B2BITS_FixEngine.h>
Collaboration diagram for Engine::FixEngine:Public Member Functions | |
| void | backupLogFile (const std::string &backupFilePath) |
| Backups engine's log file under the given name and opens a new one. | |
| FastCoder * | createFastCoder (std::string const &template_fn, Engine::FIXVersion protocolVersion) |
| Creates FastCoder. | |
| FastDecoder * | createFastDecoder (std::string const &template_fn, Engine::FIXVersion protocolVersion) |
| Creates FastDecoder. | |
| Session * | createFastSession (std::string const &templateFn, Application *pApp, const std::string &senderCompID, const std::string &targetCompID, FIXVersion appVer, const SessionExtraParameters *pParam=NULL, const MessageStorageType storageType=persistentMM_storageType) |
| Creates FIX-over-FAST session. | |
| ProtocolID | createFixParser (std::string const &scpProtocolName, FixVersionToProtocolName const *appProtocols=NULL) |
| Creates protocol using loaded protocol definition files. | |
| Globex::MDApplication * | createMDApplication (Globex::MDApplicationParams const ¶ms, Globex::MDApplicationListener *appListener=NULL) |
| Creates instance of the CME Globex FIX/FAST adapter. | |
| Globex::MDApplication * | createMDApplication (Globex::MDApplicationParams const ¶ms, Globex::DataReaderAbstract *dataReader, Globex::MDApplicationListener *appListener=NULL) |
| micex_mfix::micex_mfix_application * | createMICEXApplication (micex_mfix::micex_mfix_application_params const ¶ms, micex_mfix::mfix_data_reader_abstract *dataReader, micex_mfix::micex_mfix_application_listener *appListener=NULL) |
| micex_mfix::micex_mfix_application * | createMICEXApplication (micex_mfix::micex_mfix_application_params const ¶ms, micex_mfix::micex_mfix_application_listener *appListener=NULL) |
| Creates instance of the MICEX MFIX adapter. | |
| ProtocolID | createProtocol (std::string const &name, FIXVersion baseVer, std::string const &additionalXml) |
| Register new custom FIX Protocol and returns its identifier. | |
| Session * | createSession (Application *pApp, const std::string &senderCompID, const std::string &targetCompID, ProtocolID scpID, const SessionExtraParameters *pParam=NULL, const MessageStorageType storageType=persistentMM_storageType, FIXVersion defaultAppProtocol=NA) |
| Creates a new FIX Session. | |
| Session * | createSession (Application *pApp, const std::string &senderCompID, const std::string &targetCompID, FIXVersion appVer, const SessionExtraParameters *pParam=NULL, const MessageStorageType storageType=persistentMM_storageType, UnderlyingProtocol underlyingProtocolType=FIX_TCP) |
| Creates a new FIX Session. | |
| Session * | createSession (Application *pApp, const std::string &senderCompID, const std::string &targetCompID, const std::string &protocolName, const SessionExtraParameters *pParam=NULL, const MessageStorageType storageType=persistentMM_storageType, FIXVersion defaultAppProtocol=NA) |
| Creates a new FIX Session. | |
| AdminApplication * | getAdminApplication () |
| Returns administrative application. | |
| FIXVersion | getBaseProtocol (ProtocolID protocolID) const |
| Returns base FIX protocol version. | |
| FixDictionary2::DictionaryT::CPtr | getDictionary () const |
| Returns reference to protocol dictionary. | |
| int | getListenPort () |
| Returns Engine's listen port. | |
| const FAProperties * | getProperties () const |
| Returns settings. | |
| ProtocolID | getProtocolID (const std::string &name) const |
| Returns unique protocol ID. | |
| Engine::AsciiString | getProtocolName (ProtocolID protocolID) const |
| Returns unique protocol name. | |
| Engine::SessionsManager * | getSessionsManager () |
| Returns the current SessionsManager. | |
| MessageStorageType | getSessionStorageType () const |
| Returns the default unregistered session's storage type. | |
| void | getStatistics (Statistics *apS) |
| Returns the statistical information. | |
| void | loadProtocolFile (std::string const &fileName) |
| Loads protocol definition/customization file. | |
| void | registerAdminApplication (AdminApplication *app) |
| Register administrative application. | |
| void | registerEventListener (Engine::EventListener *apListener) |
| Registers the given EventListener with FixEngine. | |
| void | registerSessionsManager (SessionsManager *apManager) |
| Registers SessionsManager with the engine. | |
| void | setSessionStorageType (const MessageStorageType type) |
| Sets the default unregistered session's storage type. | |
| void | stop (void) |
| Stops the engine's worker threads. | |
| bool | unregisterEventListener (Engine::EventListener *apListener) |
| Unregisters the given EventListener. | |
Static Public Member Functions | |
| static void | clearAdditionalFields () |
| Destroys the additional fields. | |
| static void | destroy () |
| Destroys the instance of this class. | |
| static const EngineProperties | GetEnginePropertiesDefaults () |
| Retrieves properties defaults. | |
| static std::string | getEngineVersion () |
| Returns version of the FixEngine. | |
| static FixEngine * | init (const EngineProperties &engineProperties) |
| Initializes the Engine. | |
| static FixEngine * | init (const std::string &propertiesFileName="", int listenPort=-1, const std::string &engineRoot="", const std::string &additionalFields="") |
| Initializes the Engine. | |
| static void | setAdditionalFields (const std::string &propertiesFileName="", const std::string &engineRoot="", const std::string &additionalFields="") |
| Initializes the additional fields. | |
| static FixEngine * | singleton () |
| Returns an instance of this class. | |
FIX Engine interface.
Definition at line 108 of file B2BITS_FixEngine.h.
| void Engine::FixEngine::backupLogFile | ( | const std::string & | backupFilePath ) |
Backups engine's log file under the given name and opens a new one.
| backupFilePath | the current engine's log will be moved to this path. |
| static void Engine::FixEngine::clearAdditionalFields | ( | ) | [static] |
Destroys the additional fields.
| FastCoder* Engine::FixEngine::createFastCoder | ( | std::string const & | template_fn, |
| Engine::FIXVersion | protocolVersion | ||
| ) |
Creates FastCoder.
| FastDecoder* Engine::FixEngine::createFastDecoder | ( | std::string const & | template_fn, |
| Engine::FIXVersion | protocolVersion | ||
| ) |
Creates FastDecoder.
| Session* Engine::FixEngine::createFastSession | ( | std::string const & | templateFn, |
| Application * | pApp, | ||
| const std::string & | senderCompID, | ||
| const std::string & | targetCompID, | ||
| FIXVersion | appVer, | ||
| const SessionExtraParameters * | pParam = NULL, |
||
| const MessageStorageType | storageType = persistentMM_storageType |
||
| ) |
Creates FIX-over-FAST session.
| ProtocolID Engine::FixEngine::createFixParser | ( | std::string const & | scpProtocolName, |
| FixVersionToProtocolName const * | appProtocols = NULL |
||
| ) |
Creates protocol using loaded protocol definition files.
| [in] | scpProtocolName | Protocol name (attribute 'id' in the XML file) to create parser for |
| [in] | appProtocols | Set of application level protocol. Required if SCP protocol is FIXT 1.1. |
| Globex::MDApplication* Engine::FixEngine::createMDApplication | ( | Globex::MDApplicationParams const & | params, |
| Globex::MDApplicationListener * | appListener = NULL |
||
| ) |
Creates instance of the CME Globex FIX/FAST adapter.
| Globex::MDApplication* Engine::FixEngine::createMDApplication | ( | Globex::MDApplicationParams const & | params, |
| Globex::DataReaderAbstract * | dataReader, | ||
| Globex::MDApplicationListener * | appListener = NULL |
||
| ) |
| micex_mfix::micex_mfix_application* Engine::FixEngine::createMICEXApplication | ( | micex_mfix::micex_mfix_application_params const & | params, |
| micex_mfix::micex_mfix_application_listener * | appListener = NULL |
||
| ) |
Creates instance of the MICEX MFIX adapter.
| micex_mfix::micex_mfix_application* Engine::FixEngine::createMICEXApplication | ( | micex_mfix::micex_mfix_application_params const & | params, |
| micex_mfix::mfix_data_reader_abstract * | dataReader, | ||
| micex_mfix::micex_mfix_application_listener * | appListener = NULL |
||
| ) |
| ProtocolID Engine::FixEngine::createProtocol | ( | std::string const & | name, |
| FIXVersion | baseVer, | ||
| std::string const & | additionalXml | ||
| ) |
Register new custom FIX Protocol and returns its identifier.
| name | Unique name of the protocol |
| baseVer | Base FIX Version |
| additionalXml | FIX Protocol customization file |
| Utils::Exception | If protocol with given name already exists or additionalXml points to default additional.xml file. |
| Session* Engine::FixEngine::createSession | ( | Application * | pApp, |
| const std::string & | senderCompID, | ||
| const std::string & | targetCompID, | ||
| ProtocolID | scpID, | ||
| const SessionExtraParameters * | pParam = NULL, |
||
| const MessageStorageType | storageType = persistentMM_storageType, |
||
| FIXVersion | defaultAppProtocol = NA |
||
| ) |
Creates a new FIX Session.
| pApp | a pointer to the Application that will process the incoming messages. |
| senderCompID | SenderCompID of the session. |
| targetCompID | TargetCompID of the session. |
| scpID | FIX session control protocol identifier. |
| pParam | an option session parameters, can be NULL. |
| storageType | Message storage type |
| defaultAppProtocol | Default application FIX protocol version. Required if protocolID points to FIXT 1.1 protocol. |
| Session* Engine::FixEngine::createSession | ( | Application * | pApp, |
| const std::string & | senderCompID, | ||
| const std::string & | targetCompID, | ||
| FIXVersion | appVer, | ||
| const SessionExtraParameters * | pParam = NULL, |
||
| const MessageStorageType | storageType = persistentMM_storageType, |
||
| UnderlyingProtocol | underlyingProtocolType = FIX_TCP |
||
| ) |
Creates a new FIX Session.
| pApp | a pointer to the Application that will process the incoming messages. |
| senderCompID | SenderCompID of the session. |
| targetCompID | TargetCompID of the session. |
| appVer | Application FIX protocol version or default application FIX protocol in case of FIXT 1.1 session. |
| pParam | an option session parameters, can be NULL. |
| storageType | - type of the message storage |
| Session* Engine::FixEngine::createSession | ( | Application * | pApp, |
| const std::string & | senderCompID, | ||
| const std::string & | targetCompID, | ||
| const std::string & | protocolName, | ||
| const SessionExtraParameters * | pParam = NULL, |
||
| const MessageStorageType | storageType = persistentMM_storageType, |
||
| FIXVersion | defaultAppProtocol = NA |
||
| ) |
Creates a new FIX Session.
| pApp | a pointer to the Application that will process the incoming messages. |
| senderCompID | SenderCompID of the session. |
| targetCompID | TargetCompID of the session. |
| protocolName | Name of the protocol ('id' attribute in the FIX Dictionary file). FIX Parser for this protocol should be created. |
| pParam | an option session parameters, can be NULL. |
| storageType | - type of the message storage |
| defaultAppProtocol | Default application FIX protocol version. Required if underlyingProtocolType equals FIXT11_TCP or protocolID points to FIXT 1.1 protocol. |
| static void Engine::FixEngine::destroy | ( | ) | [static] |
Destroys the instance of this class.
| AdminApplication* Engine::FixEngine::getAdminApplication | ( | ) |
Returns administrative application.
If there is no registered custom application, embedded is returned.
| FIXVersion Engine::FixEngine::getBaseProtocol | ( | ProtocolID | protocolID ) | const |
Returns base FIX protocol version.
| Utils::Exception | If protocol with given ID is not found. |
| FixDictionary2::DictionaryT::CPtr Engine::FixEngine::getDictionary | ( | ) | const |
Returns reference to protocol dictionary.
| static const EngineProperties Engine::FixEngine::GetEnginePropertiesDefaults | ( | ) | [static] |
Retrieves properties defaults.
| static std::string Engine::FixEngine::getEngineVersion | ( | ) | [static] |
| int Engine::FixEngine::getListenPort | ( | ) |
Returns Engine's listen port.
| const FAProperties* Engine::FixEngine::getProperties | ( | ) | const |
Returns settings.
| ProtocolID Engine::FixEngine::getProtocolID | ( | const std::string & | name ) | const |
Returns unique protocol ID.
| [in] | Unique | protocol name |
| Utils::Exception | If protocol with given name is not found. |
| Engine::AsciiString Engine::FixEngine::getProtocolName | ( | ProtocolID | protocolID ) | const |
Returns unique protocol name.
| [in] | protocolID | Unique protocol ID |
| Utils::Exception | If protocol with given ID is not found. |
| Engine::SessionsManager* Engine::FixEngine::getSessionsManager | ( | ) |
Returns the current SessionsManager.
| MessageStorageType Engine::FixEngine::getSessionStorageType | ( | ) | const |
Returns the default unregistered session's storage type.
| void Engine::FixEngine::getStatistics | ( | Statistics * | apS ) |
Returns the statistical information.
| [out] | apS | Instance of Statistics to store result. |
| static FixEngine* Engine::FixEngine::init | ( | const EngineProperties & | engineProperties ) | [static] |
| static FixEngine* Engine::FixEngine::init | ( | const std::string & | propertiesFileName = "", |
| int | listenPort = -1, |
||
| const std::string & | engineRoot = "", |
||
| const std::string & | additionalFields = "" |
||
| ) | [static] |
Initializes the Engine.
| propertiesFileName | the FIX Engine configuration parameters file name. If it is equal to "", then "./engine.properties" is used. |
| listenPort | Engine's listen port. Overrides the value from the properties file. If it is equal to -1 then the value from the proterties file is used. |
| engineRoot | The 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. |
| additionalFields | Specifies additional messages fields. |
| void Engine::FixEngine::loadProtocolFile | ( | std::string const & | fileName ) |
Loads protocol definition/customization file.
| [in] | fileName | Path to the protocol file |
| void Engine::FixEngine::registerAdminApplication | ( | AdminApplication * | app ) |
Register administrative application.
| app | custom administrative application. |
| Utils::Exception | if administrative application already registered. |
| void Engine::FixEngine::registerEventListener | ( | Engine::EventListener * | apListener ) |
Registers the given EventListener with FixEngine.
| apListener | EventListener |
| void Engine::FixEngine::registerSessionsManager | ( | SessionsManager * | apManager ) |
Registers SessionsManager with the engine.
| apManager | Instance of SessionsManager. |
| static void Engine::FixEngine::setAdditionalFields | ( | const std::string & | propertiesFileName = "", |
| const std::string & | engineRoot = "", |
||
| const std::string & | additionalFields = "" |
||
| ) | [static] |
Initializes the additional fields.
| propertiesFileName | the FIX Engine configuration parameters file name. If it is equal to "", then "./engine.properties" is used. |
| engineRoot | The 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 proterties file is used. |
| additionalFields | Specifies additional messages fields. |
| void Engine::FixEngine::setSessionStorageType | ( | const MessageStorageType | type ) |
Sets the default unregistered session's storage type.
| type | storage type that will be used in new sessions. |
| static FixEngine* Engine::FixEngine::singleton | ( | ) | [static] |
| void Engine::FixEngine::stop | ( | void | ) |
Stops the engine's worker threads.
| bool Engine::FixEngine::unregisterEventListener | ( | Engine::EventListener * | apListener ) |
Unregisters the given EventListener.
| apListener | EventListener |
1.7.2