OnixS C++ CME MDP Premium Market Data Handler  5.8.3
API Documentation
FeedLink.h
Go to the documentation of this file.
1 // Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2 //
3 // This software owned by Onix Solutions Limited [OnixS] and is
4 // protected by copyright law and international copyright treaties.
5 //
6 // Access to and use of the software is governed by the terms of the applicable
7 // OnixS Software Services Agreement (the Agreement) and Customer end user license
8 // agreements granting a non-assignable, non-transferable and non-exclusive license
9 // to use the software for it's own data processing purposes under the terms defined
10 // in the Agreement.
11 //
12 // Except as otherwise granted within the terms of the Agreement, copying or
13 // reproduction of any part of this source code or associated reference material
14 // to any other location for further reproduction or redistribution, and any
15 // amendments to this copyright notice, are expressly prohibited.
16 //
17 // Any reproduction or redistribution for sale or hiring of the Software not in
18 // accordance with the terms of the Agreement is a violation of copyright law.
19 //
20 
21 #pragma once
22 
23 #include <string>
24 
25 #include <OnixS/CME/MDH/Integral.h>
26 
28 
30 
31 /// Abstraction of a link used by the NetFeed
32 /// instances to cover transportation layer.
33 ///
34 /// The actual implementations are provided by
35 /// a particular feed engine, whereas the NetFeed
36 /// class interacts with the feed engine through
37 /// the given abstraction.
39 {
40 public:
41  /// Establishes connection for the given feed.
42  ///
43  /// The timeout parameter specifies amount of time
44  /// allocated for the link to get into connected/linked
45  /// state. The string parameter is used by the feed
46  /// engine to report on non-critical issues which may
47  /// take place while establishing communication link.
48  virtual void link(const NetFeed&, UInt32, std::string&) = 0;
49 
50  /// Closes communication link for the given feed.
51  virtual void unlink(const NetFeed&) = 0;
52 
53  /// Sends the given message to the counterpart.
54  ///
55  /// The given member is invoked by Handler only for the
56  /// feeds assuming bi-directional communication like the
57  /// historical ones. Multicast links aren't supposed to
58  /// provide the given functionality and thus may raise
59  /// an exception.
60  virtual void send(const NetFeed&, const void*, size_t, UInt32) = 0;
61 
62  /// Releases the link used by the given feed.
63  /// Once invoked, no other members are invoked
64  /// afterwards any more.
65  virtual void release(const NetFeed&) = 0;
66 
67 protected:
68  /// Instances are constructed through descendants.
70 
71  /// Instances aren't destructed in a regular way.
72  /// The 'release()' member serves for that purpose.
73  virtual ~NetFeedLink() {}
74 
75 private:
76  NetFeedLink(const NetFeedLink&);
77 
78  NetFeedLink& operator=(const NetFeedLink&);
79 };
80 
UInt32 UInt32
uInt32.
Definition: Fields.h:192
Base attributes of market data feed.
Definition: Feed.h:54
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:67
#define ONIXS_CMEMDH_EXPORTED
Definition: Compiler.h:135
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
Definition: Bootstrap.h:48
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:68