OnixS Eurex EDCI Handler C++ library 1.0.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Handler.h
Go to the documentation of this file.
1/*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any
13 * part of this source code or associated reference material to any other location for further
14 * reproduction or redistribution, and any amendments to this copyright notice, are expressly
15 * 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#pragma once
22
23// Project specific includes
25#include <OnixS/Eurex/DropCopy/Export.h>
28
29// Standard includes
30#include <string>
31
32namespace OnixS { namespace Eurex { namespace DropCopy {
33
35struct HandlerSettings;
36class Logon;
37class ErrorListener;
38class WarningListener;
41class SessionListener;
43
45class ONIXS_EUREX_EDCI_EXPORT Handler
46{
47public:
52 Handler(const HandlerSettings& settings);
53
55 virtual ~Handler();
56
57 Handler(const Handler&) = delete; // no implementation
58 Handler& operator=(const Handler&) = delete; // no implementation
59
81 void connect(
82 const std::string& hostName,
83 std::uint16_t port,
84 const Logon& logon,
85 const std::string& localNetworkInterface = ""
86 );
87
114 const std::string& primaryHostName,
115 std::uint16_t primaryPort,
116 const std::string& secondaryHostName,
117 std::uint16_t secondaryPort,
118 const Logon& logon,
119 const std::string& localNetworkInterface = ""
120 );
121
128
133
139
145
151
157
163
169
175
178
180 void log(LogLevel::Enum logLevel, const std::string& str);
181
185 const std::string& licenseExpirationDate() const;
186
188 static const std::string& version();
189
190private:
191 struct Impl;
192 Impl* impl_;
193};
194
195}}} // namespace OnixS::Eurex::DropCopy
Provides events representing changes in the Handler's connection state.
void registerWarningListener(WarningListener *listener)
Handler & operator=(const Handler &)=delete
static const std::string & version()
Returns Handler's version.
void registerHandlerStateListener(HandlerStateListener *listener)
void registerErrorListener(ErrorListener *listener)
void log(LogLevel::Enum logLevel, const std::string &str)
Logs the given user-level message to the handler log.
void registerConnectionListener(ConnectionListener *listener)
Handler(const Handler &)=delete
void registerSessionListener(SessionListener *listener)
void connect(const std::string &primaryHostName, std::uint16_t primaryPort, const std::string &secondaryHostName, std::uint16_t secondaryPort, const Logon &logon, const std::string &localNetworkInterface="")
Handler(const HandlerSettings &settings)
const std::string & licenseExpirationDate() const
void registerOrderHandlingListener(OrderHandlingListener *listener)
void registerConnectionStateListener(ConnectionStateListener *listener)
void connect(const std::string &hostName, std::uint16_t port, const Logon &logon, const std::string &localNetworkInterface="")
HandlerState::Enum state() const
Returns handler state.
virtual ~Handler()
Finalizes the Handler.
Initial logon message parameters.
Definition Logon.h:31
Enum
Defines the state that the handler is in.