OnixS C++ CME MDP Conflated UDP Handler  1.1.2
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 
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 {
41  const NetFeedLink&);
42 
43  NetFeedLink&
44  operator =(
45  const NetFeedLink&);
46 
47 protected:
48  /// Instances are constructed through descendants.
50  {
51  }
52 
53  /// Instances aren't destructed in a regular way.
54  /// The 'release()' member serves for that purpose.
55  virtual ~NetFeedLink()
56  {
57  }
58 
59 public:
60  /// Establishes connection for the given feed.
61  ///
62  /// The timeout parameter specifies amount of time
63  /// allocated for the link to get into connected/linked
64  /// state. The string parameter is used by the feed
65  /// engine to report on non-critical issues which may
66  /// take place while establishing communication link.
67  virtual
68  void
69  link(
70  const NetFeed&,
71  UInt32,
72  std::string&) = 0;
73 
74  /// Closes communication link for the given feed.
75  virtual
76  void
77  unlink(
78  const NetFeed&) = 0;
79 
80  /// Sends the given message to the counterpart.
81  ///
82  /// The given member is invoked by Handler only for the
83  /// feeds assuming bi-directional communication like the
84  /// historical ones. Multicast links aren't supposed to
85  /// provide the given functionality and thus may raise
86  /// an exception.
87  virtual
88  void
89  send(
90  const NetFeed&,
91  const void*,
92  size_t,
93  UInt32) = 0;
94 
95  /// Releases the link used by the given feed.
96  /// Once invoked, no other members are invoked
97  /// afterwards any more.
98  virtual
99  void
100  release(
101  const NetFeed&) = 0;
102 };
103 
Base attributes of market data feed.
Definition: Feed.h:60
UInt32 UInt32
uInt32.
Definition: Fields.h:261
#define ONIXS_CONFLATEDUDP_LTWT_CLASS_DECL(name)
Definition: Bootstrap.h:107
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition: Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS
Definition: Bootstrap.h:55
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition: Bootstrap.h:153