OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
Engine.h
Go to the documentation of this file.
1#pragma once
2/*
3* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4*
5* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6* and international copyright treaties.
7*
8* Access to and use of the software is governed by the terms of the applicable OnixS Software
9* Services Agreement (the Agreement) and Customer end user license agreements granting
10* a non-assignable, non-transferable and non-exclusive license to use the software
11* for it's own data processing purposes under the terms defined in the Agreement.
12*
13* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14* of this source code or associated reference material to any other location for further reproduction
15* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16*
17* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18* the terms of the Agreement is a violation of copyright law.
19*/
20
21#include <string>
22#include <set>
23#include <vector>
24
28
29namespace OnixS {
30namespace FIX {
34
35typedef std::vector<OnixS::FIX::Dictionary> Dictionaries;
36typedef std::vector<int> ListenPorts;
37typedef std::vector<ISessionReactor *> ISessionReactors;
38
41{
42public:
51 static Engine * init(int listenPort = 0, ISessionReactor * stack = ONIXS_FIXENGINE_NULLPTR);
52
59 static Engine * init(const std::string & configFile, ISessionReactor * stack = ONIXS_FIXENGINE_NULLPTR);
60 static Engine * init(const std::string & configFile, const ISessionReactors & stacks);
61
68 static Engine * initFromString(const std::string & configuration, ISessionReactor * stack = ONIXS_FIXENGINE_NULLPTR);
69 static Engine * initFromString(const std::string & configuration, const ISessionReactors & stacks);
70
78 static Engine * init(const EngineSettings & settings, const ISessionReactors & stacks);
79
83 void log(const std::string & message);
84
88 static void shutdown();
89
95 static Engine * instance();
96
100 static bool initialized();
101
105 int listenPort() const;
106
111 const std::string & logDirectory() const;
112
115
118
125 void addSessionDictionary(const std::string & dictionaryFile);
126
132 void addSessionDictionaryFromString(const std::string & dialectString);
133
141 void addListenPorts(const ListenPorts & ports, const ISessionReactors & stacks = ISessionReactors());
142
147 void removeListenPort(int port);
148 void removeListenPorts(const ListenPorts & ports);
149
154 void addSslListenPort(int port);
155 void addSslListenPorts(const ListenPorts & ports);
156
161 void removeSslListenPort(int port);
163
169
174
185
187 const EngineSettings & settings() const;
188
189 class Impl;
190
191private:
192 Engine();
193 ~Engine();
194};
195
196}
197}
#define ONIXS_FIXENGINE_API_DECL(typeKind, typeName)
Definition ABI.h:57
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
#define ONIXS_FIXENGINE_NULLPTR
Definition Compiler.h:200
FIX Engine settings.
Timestamp licenseExpirationDate() const
Returns the Engine's license expiration date.
void addSessionDictionaryFromString(const std::string &dialectString)
Adds the session level dictionary(s) from the plain text string with the description of the FIX Dicti...
void removeListenPorts(const ListenPorts &ports)
int listenPort() const
Returns the listen port.
static Engine * init(const std::string &configFile, ISessionReactor *stack=ONIXS_FIXENGINE_NULLPTR)
Initializes the FIX Engine.
void removeListenPort(int port)
Removes the listen port(s) for incoming connections.
static Engine * initFromString(const std::string &configuration, const ISessionReactors &stacks)
static Engine * init(const EngineSettings &settings, ISessionReactor *stack=ONIXS_FIXENGINE_NULLPTR)
Initializes the FIX Engine.
static void shutdown()
Shutdowns the FIX Engine and releases all resources.
void synchronizeHighResolutionTimeServiceWithSystemTime()
Performs the synchronization of the high-resolution internal time service with the system time on the...
void removeSslListenPort(int port)
Removes the ssl listen port(s) for incoming ssl connections.
Dictionaries dictionaries() const
Returns the array of loaded dictionaries.
void addSessionDictionary(const std::string &dictionaryFile)
Adds the session level dictionary(s) from the XML file(s) with the description of the FIX Dictionary(...
void log(const std::string &message)
Logs the given user's message to FIX Engine's log file.
static Engine * initFromString(const std::string &configuration, ISessionReactor *stack=ONIXS_FIXENGINE_NULLPTR)
Initializes the FIX Engine.
void unregisterListener()
Unregisters the Engine listener.
const EngineSettings & settings() const
Returns the current Engine-level settings.
static bool initialized()
Returns 'true' if the FIX Engine has been initialized, otherwise - 'false'.
void addSslListenPorts(const ListenPorts &ports)
const std::string & logDirectory() const
Returns the Engine log directory.
void removeSslListenPorts(const ListenPorts &ports)
static Engine * init(const std::string &configFile, const ISessionReactors &stacks)
static Engine * init(int listenPort=0, ISessionReactor *stack=ONIXS_FIXENGINE_NULLPTR)
Initializes the FIX Engine.
void addListenPort(int port, ISessionReactor *stack=ONIXS_FIXENGINE_NULLPTR)
Adds the listen port(s) for incoming connections.
static Engine * init(const EngineSettings &settings, const ISessionReactors &stacks)
void addSslListenPort(int port)
Adds the ssl listen port(s) for incoming ssl connections.
void registerListener(IEngineListener *listener)
Registers the Engine listener.
static Engine * instance()
Returns the Engine instance.
void addListenPorts(const ListenPorts &ports, const ISessionReactors &stacks=ISessionReactors())
The Engine's Listener.
The session's network stack reactor interface.
The timestamps related functionality.
Definition Timestamp.h:92
std::vector< ISessionReactor * > ISessionReactors
Definition Engine.h:37
std::vector< OnixS::FIX::Dictionary > Dictionaries
Definition Engine.h:35
std::vector< int > ListenPorts
Listen ports.
Definition Engine.h:36