OnixS C++ FIX Engine 4.14.0
Users' manual and 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;
38typedef std::string LocalNetworkInterface;
39typedef std::vector<LocalNetworkInterface> LocalNetworkInterfaces;
40
43{
44public:
53 static Engine * init(int listenPort = 0, ISessionReactor * stack = nullptr);
54
61 static Engine * init(const std::string & configFile, ISessionReactor * stack = nullptr);
62 static Engine * init(const std::string & configFile, const ISessionReactors & stacks);
63
70 static Engine * initFromString(const std::string & configuration, ISessionReactor * stack = nullptr);
71 static Engine * initFromString(const std::string & configuration, const ISessionReactors & stacks);
72
79 static Engine * init(const EngineSettings & settings, ISessionReactor * stack = nullptr);
80 static Engine * init(const EngineSettings & settings, const ISessionReactors & stacks);
81
85 void log(const std::string & message);
86
93 static void shutdown();
94
100 static Engine * instance();
101
105 static bool initialized();
106
110 int listenPort() const;
111
116 const std::string & logDirectory() const;
117
120
123
130 void addSessionDictionary(const std::string & dictionaryFile);
131
137 void addSessionDictionaryFromString(const std::string & dialectString);
138
148 void addListenPort(int port, ISessionReactor * stack = nullptr);
149
159 void addListenPorts(const ListenPorts & ports, const ISessionReactors & stacks = ISessionReactors());
160
171 void addListenNetworkInterfaceAndPort(const LocalNetworkInterface & networkInterface, ISessionReactor * stack = nullptr);
172
184
195 void removeListenPort(int port);
196
207 void removeListenPorts(const ListenPorts & ports);
208
219
230
237 void addSslListenPort(int port);
238
245 void addSslListenPorts(const ListenPorts & ports);
246
256
266
275 void removeSslListenPort(int port);
276
286
295
304
310
315
326
328 const EngineSettings & settings() const;
329
330 class Impl;
331
332private:
333 Engine();
334 ~Engine();
335};
336
337}
338}
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
FIX Engine settings.
static Engine * init(const std::string &configFile, ISessionReactor *stack=nullptr)
Timestamp licenseExpirationDate() const
Returns the Engine's license expiration date.
void addSessionDictionaryFromString(const std::string &dialectString)
void removeListenPorts(const ListenPorts &ports)
static Engine * init(int listenPort=0, ISessionReactor *stack=nullptr)
int listenPort() const
void removeSslListenNetworkInterfaceAndPort(const LocalNetworkInterface &networkInterface)
static Engine * init(const EngineSettings &settings, ISessionReactor *stack=nullptr)
void addSslListenNetworkInterfacesAndPorts(const LocalNetworkInterfaces &interfaces)
void removeListenPort(int port)
void addListenNetworkInterfacesAndPorts(const LocalNetworkInterfaces &interfaces, const ISessionReactors &stacks=ISessionReactors())
static Engine * initFromString(const std::string &configuration, const ISessionReactors &stacks)
static void shutdown()
void synchronizeHighResolutionTimeServiceWithSystemTime()
void removeSslListenPort(int port)
void removeListenNetworkInterfaceAndPort(const LocalNetworkInterface &networkInterface)
Dictionaries dictionaries() const
Returns the array of loaded dictionaries.
void addSessionDictionary(const std::string &dictionaryFile)
void log(const std::string &message)
const EngineSettings & settings() const
Returns the current Engine-level settings.
void removeListenNetworkInterfacesAndPorts(const LocalNetworkInterfaces &interfaces)
static bool initialized()
void addSslListenPorts(const ListenPorts &ports)
const std::string & logDirectory() const
void addListenPort(int port, ISessionReactor *stack=nullptr)
void addSslListenNetworkInterfaceAndPort(const LocalNetworkInterface &networkInterface)
void removeSslListenPorts(const ListenPorts &ports)
void addListenNetworkInterfaceAndPort(const LocalNetworkInterface &networkInterface, ISessionReactor *stack=nullptr)
static Engine * init(const std::string &configFile, const ISessionReactors &stacks)
static Engine * init(const EngineSettings &settings, const ISessionReactors &stacks)
void addSslListenPort(int port)
void registerListener(IEngineListener *listener)
static Engine * initFromString(const std::string &configuration, ISessionReactor *stack=nullptr)
static Engine * instance()
void removeSslListenNetworkInterfacesAndPorts(const LocalNetworkInterfaces &interfaces)
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< LocalNetworkInterface > LocalNetworkInterfaces
Definition Engine.h:39
ONIXS_FIXENGINE_API_DECL(class, IEngineListener)
std::vector< ISessionReactor * > ISessionReactors
Definition Engine.h:37
std::string LocalNetworkInterface
Local interfaces.
Definition Engine.h:38
std::vector< OnixS::FIX::Dictionary > Dictionaries
Definition Engine.h:35
std::vector< int > ListenPorts
Listen ports.
Definition Engine.h:36