OnixS C++ CME MDP Premium Market Data Handler  5.8.9
API Documentation
MarketDataListener.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 <OnixS/CME/MDH/Packet.h>
24 #include <OnixS/CME/MDH/Messages.h>
25 
27 
29 
31 
32 /// Collection of market data supplied
33 /// via message processing callbacks.
34 template <class MessageType>
36 {
37 public:
38  /// Type of message whose instance
39  /// is referenced by given arguments.
40  typedef MessageType Message;
41 
42  /// Initializes instance with given message
43  /// instance and packet containing that message.
44  MessageArgs(const NetPacket& packet, const Message& message)
45  : packet_(packet)
46  , message_(message)
47  {
48  }
49 
50  /// Instance of packet containing the message.
51  const NetPacket& packet() const
52  {
53  return packet_;
54  }
55 
56  /// Instance of message being processed.
57  const Message& message() const
58  {
59  return message_;
60  }
61 
62 private:
63  const NetPacket& packet_;
64  const Message& message_;
65 
66  // Coping/cloning is not supposed.
67 
68  MessageArgs(const MessageArgs&);
69 
70  MessageArgs& operator=(const MessageArgs&);
71 };
72 
73 /// MessageArgs template instantiation
74 /// for InstrumentDefinitionFixedIncome57 message type.
76 
77 /// MessageArgs template instantiation
78 /// for ChannelReset4 message type.
80 
81 /// MessageArgs template instantiation
82 /// for AdminHeartbeat12 message type.
84 
85 /// MessageArgs template instantiation
86 /// for AdminLogin15 message type.
88 
89 /// MessageArgs template instantiation
90 /// for AdminLogout16 message type.
92 
93 /// MessageArgs template instantiation
94 /// for AdminLogin408 message type.
96 
97 /// MessageArgs template instantiation
98 /// for AdminLogout409 message type.
100 
101 /// MessageArgs template instantiation
102 /// for AdminHeartbeat410 message type.
104 
105 /// MessageArgs template instantiation
106 /// for InstrumentDefinitionFuture54 message type.
108 
109 /// MessageArgs template instantiation
110 /// for InstrumentDefinitionSpread56 message type.
112 
113 /// MessageArgs template instantiation
114 /// for SecurityStatus30 message type.
116 
117 /// MessageArgs template instantiation
118 /// for IncrementalRefreshBook46 message type.
120 
121 /// MessageArgs template instantiation
122 /// for IncrementalRefreshDailyStatistics49 message type.
124 
125 /// MessageArgs template instantiation
126 /// for IncrementalRefreshLimitsBanding50 message type.
128 
129 /// MessageArgs template instantiation
130 /// for IncrementalRefreshSessionStatistics51 message type.
132 
133 /// MessageArgs template instantiation
134 /// for IncrementalRefreshVolume37 message type.
136 
137 /// MessageArgs template instantiation
138 /// for SnapshotFullRefresh52 message type.
140 
141 /// MessageArgs template instantiation
142 /// for QuoteRequest39 message type.
144 
145 /// MessageArgs template instantiation
146 /// for InstrumentDefinitionOption55 message type.
148 
149 /// MessageArgs template instantiation
150 /// for IncrementalRefreshTradeSummary48 message type.
152 
153 /// MessageArgs template instantiation
154 /// for IncrementalRefreshOrderBook47 message type.
156 
157 /// MessageArgs template instantiation
158 /// for SnapshotFullRefreshOrderBook53 message type.
160 
163 
164 /// MessageArgs template instantiation for a FIX multi-container.
166 
169 
170 /// Callbacks invoked by Handler during market data
171 /// processing to reflect various stages of processing.
173 {
174  /// Invoked when processing of packet has begun.
175  virtual void onPacket(Handler&, const PacketArgs&) {}
176 
177  /// Invoked when processing of packet has ended.
178  virtual void onEndOfPacket(Handler&, const PacketArgs&) {}
179 
180  /// Invoked when processing of
181  /// InstrumentDefinitionFixedIncome57 message has begun.
183 
184  /// Invoked when processing of message of
185  /// InstrumentDefinitionFixedIncome57 message has ended.
187 
188  /// Invoked when processing of
189  /// ChannelReset4 message has begun.
190  virtual void onMessage(Handler&, const ChannelReset4Args&) {}
191 
192  /// Invoked when processing of message of
193  /// ChannelReset4 message has ended.
194  virtual void onEndOfMessage(Handler&, const ChannelReset4Args&) {}
195 
196  /// Invoked when processing of
197  /// AdminHeartbeat12 message has begun.
198  virtual void onMessage(Handler&, const AdminHeartbeat12Args&) {}
199 
200  /// Invoked when processing of message of
201  /// AdminHeartbeat12 message has ended.
202  virtual void onEndOfMessage(Handler&, const AdminHeartbeat12Args&) {}
203 
204  /// Invoked when processing of
205  /// AdminHeartbeat410 message has begun.
206  virtual void onMessage(Handler&, const AdminHeartbeat410Args&) {}
207 
208  /// Invoked when processing of message of
209  /// AdminHeartbeat410 message has ended.
210  virtual void onEndOfMessage(Handler&, const AdminHeartbeat410Args&) {}
211 
212  /// Invoked when processing of
213  /// AdminLogin15 message has begun.
214  virtual void onMessage(Handler&, const AdminLogin15Args&) {}
215 
216  /// Invoked when processing of message of
217  /// AdminLogin15 message has ended.
218  virtual void onEndOfMessage(Handler&, const AdminLogin15Args&) {}
219 
220  /// Invoked when processing of
221  /// AdminLogout16 message has begun.
222  virtual void onMessage(Handler&, const AdminLogout16Args&) {}
223 
224  /// Invoked when processing of message of
225  /// AdminLogout16 message has ended.
226  virtual void onEndOfMessage(Handler&, const AdminLogout16Args&) {}
227 
228  /// Invoked when processing of
229  /// AdminLogin408 message has begun.
230  virtual void onMessage(Handler&, const AdminLogin408Args&) {}
231 
232  /// Invoked when processing of message of
233  /// AdminLogin408 message has ended.
234  virtual void onEndOfMessage(Handler&, const AdminLogin408Args&) {}
235 
236  /// Invoked when processing of
237  /// AdminLogout409 message has begun.
238  virtual void onMessage(Handler&, const AdminLogout409Args&) {}
239 
240  /// Invoked when processing of message of
241  /// AdminLogout409 message has ended.
242  virtual void onEndOfMessage(Handler&, const AdminLogout409Args&) {}
243 
244  /// Invoked when processing of
245  /// InstrumentDefinitionFuture54 message has begun.
247 
248  /// Invoked when processing of message of
249  /// InstrumentDefinitionFuture54 message has ended.
251 
252  /// Invoked when processing of
253  /// InstrumentDefinitionSpread56 message has begun.
255 
256  /// Invoked when processing of message of
257  /// InstrumentDefinitionSpread56 message has ended.
259 
260  /// Invoked when processing of
261  /// SecurityStatus30 message has begun.
262  virtual void onMessage(Handler&, const SecurityStatus30Args&) {}
263 
264  /// Invoked when processing of message of
265  /// SecurityStatus30 message has ended.
266  virtual void onEndOfMessage(Handler&, const SecurityStatus30Args&) {}
267 
268  /// Invoked when processing of
269  /// IncrementalRefreshBook46 message has begun.
271 
272  /// Invoked when processing of message of
273  /// IncrementalRefreshBook46 message has ended.
275 
276  /// Invoked when processing of
277  /// IncrementalRefreshDailyStatistics49 message has begun.
279 
280  /// Invoked when processing of message of
281  /// IncrementalRefreshDailyStatistics49 message has ended.
283 
284  /// Invoked when processing of
285  /// IncrementalRefreshLimitsBanding50 message has begun.
287 
288  /// Invoked when processing of message of
289  /// IncrementalRefreshLimitsBanding50 message has ended.
291 
292  /// Invoked when processing of
293  /// IncrementalRefreshSessionStatistics51 message has begun.
295 
296  /// Invoked when processing of message of
297  /// IncrementalRefreshSessionStatistics51 message has ended.
299 
300  /// Invoked when processing of
301  /// IncrementalRefreshVolume37 message has begun.
303 
304  /// Invoked when processing of message of
305  /// IncrementalRefreshVolume37 message has ended.
307 
308  /// Invoked when processing of
309  /// SnapshotFullRefresh52 message has begun.
310  virtual void onMessage(Handler&, const SnapshotFullRefresh52Args&) {}
311 
312  /// Invoked when processing of message of
313  /// SnapshotFullRefresh52 message has ended.
315 
316  /// Invoked when processing of
317  /// QuoteRequest39 message has begun.
318  virtual void onMessage(Handler&, const QuoteRequest39Args&) {}
319 
320  /// Invoked when processing of message of
321  /// QuoteRequest39 message has ended.
322  virtual void onEndOfMessage(Handler&, const QuoteRequest39Args&) {}
323 
324  /// Invoked when processing of
325  /// InstrumentDefinitionOption55 message has begun.
327 
328  /// Invoked when processing of message of
329  /// InstrumentDefinitionOption55 message has ended.
331 
332  /// Invoked when processing of
333  /// IncrementalRefreshTradeSummary48 message has begun.
335 
336  /// Invoked when processing of message of
337  /// IncrementalRefreshTradeSummary48 message has ended.
339 
340  /// Invoked when processing of
341  /// IncrementalRefreshOrderBook47 message has begun.
343 
344  /// Invoked when processing of message of
345  /// IncrementalRefreshOrderBook47 message has ended.
347 
348  /// Invoked when processing of
349  /// SnapshotFullRefreshOrderBook53 message has begun.
351 
352  /// Invoked when processing of message of
353  /// SnapshotFullRefreshOrderBook53 message has ended.
355 
356  /// Invoked when processing of the FIX message has begun.
357  ///
358  /// \warning FIX messages processed by the Handler in bounds
359  /// of instrument cache replay. These messages do not belong
360  /// to any packet and thus invocation of the given callback
361  /// is not surrounded by callbacks identifying beginning and
362  /// end of packet processing. Also, as there's no packet
363  /// containing the FIX message, the packet component of
364  /// the 'args' argument refers to no data.
365  virtual void onMessage(Handler&, const FIX::MultiContainerArgs&) {}
366 
367  /// Invoked when processing of the FIX message has ended.
368  ///
369  /// \warning FIX messages processed by the Handler in bounds
370  /// of instrument cache replay. These messages do not belong
371  /// to any packet and thus invocation of the given callback
372  /// is not surrounded by callbacks identifying beginning and
373  /// end of packet processing. Also, as there's no packet
374  /// containing the FIX message, the packet component of
375  /// the 'args' argument refers to no data.
377 };
378 
virtual void onMessage(Handler &, const SnapshotFullRefresh52Args &)
Invoked when processing of SnapshotFullRefresh52 message has begun.
virtual void onMessage(Handler &, const InstrumentDefinitionFuture54Args &)
Invoked when processing of InstrumentDefinitionFuture54 message has begun.
Exposes the FIX message being processed by the Handler and the packet containing it.
MessageType Message
Type of message whose instance is referenced by given arguments.
virtual void onMessage(Handler &, const AdminLogin408Args &)
Invoked when processing of AdminLogin408 message has begun.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
Invoked when processing of message of IncrementalRefreshSessionStatistics51 message has ended...
virtual void onMessage(Handler &, const InstrumentDefinitionSpread56Args &)
Invoked when processing of InstrumentDefinitionSpread56 message has begun.
virtual void onMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
Invoked when processing of IncrementalRefreshLimitsBanding50 message has begun.
virtual void onMessage(Handler &, const IncrementalRefreshVolume37Args &)
Invoked when processing of IncrementalRefreshVolume37 message has begun.
MessageArgs(const NetPacket &packet, const Message &message)
Initializes instance with given message instance and packet containing that message.
MessageArgs< IncrementalRefreshTradeSummary48 > IncrementalRefreshTradeSummary48Args
MessageArgs template instantiation for IncrementalRefreshTradeSummary48 message type.
Encapsulates all the machinery related with market data processing from CME Market Data Platform...
Definition: Handler.h:55
MessageArgs< SnapshotFullRefresh52 > SnapshotFullRefresh52Args
MessageArgs template instantiation for SnapshotFullRefresh52 message type.
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFuture54Args &)
Invoked when processing of message of InstrumentDefinitionFuture54 message has ended.
#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN
Definition: Bootstrap.h:70
virtual void onEndOfMessage(Handler &, const AdminLogout409Args &)
Invoked when processing of message of AdminLogout409 message has ended.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
Invoked when processing of message of IncrementalRefreshLimitsBanding50 message has ended...
MessageArgs< AdminLogout16 > AdminLogout16Args
MessageArgs template instantiation for AdminLogout16 message type.
const Message & message() const
Instance of message being processed.
MessageArgs< IncrementalRefreshDailyStatistics49 > IncrementalRefreshDailyStatistics49Args
MessageArgs template instantiation for IncrementalRefreshDailyStatistics49 message type...
Callbacks invoked by Handler during market data processing to reflect various stages of processing...
const NetPacket & packet() const
Instance of packet containing the message.
virtual void onEndOfMessage(Handler &, const SnapshotFullRefresh52Args &)
Invoked when processing of message of SnapshotFullRefresh52 message has ended.
virtual void onMessage(Handler &, const AdminLogout409Args &)
Invoked when processing of AdminLogout409 message has begun.
virtual void onEndOfMessage(Handler &, const AdminHeartbeat12Args &)
Invoked when processing of message of AdminHeartbeat12 message has ended.
MessageArgs< IncrementalRefreshLimitsBanding50 > IncrementalRefreshLimitsBanding50Args
MessageArgs template instantiation for IncrementalRefreshLimitsBanding50 message type.
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition: Bootstrap.h:35
MessageArgs< ChannelReset4 > ChannelReset4Args
MessageArgs template instantiation for ChannelReset4 message type.
virtual void onMessage(Handler &, const IncrementalRefreshOrderBook47Args &)
Invoked when processing of IncrementalRefreshOrderBook47 message has begun.
virtual void onMessage(Handler &, const IncrementalRefreshBook46Args &)
Invoked when processing of IncrementalRefreshBook46 message has begun.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshVolume37Args &)
Invoked when processing of message of IncrementalRefreshVolume37 message has ended.
MessageArgs< SecurityStatus30 > SecurityStatus30Args
MessageArgs template instantiation for SecurityStatus30 message type.
virtual void onMessage(Handler &, const SnapshotFullRefreshOrderBook53Args &)
Invoked when processing of SnapshotFullRefreshOrderBook53 message has begun.
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionOption55Args &)
Invoked when processing of message of InstrumentDefinitionOption55 message has ended.
MessageArgs< AdminLogin15 > AdminLogin15Args
MessageArgs template instantiation for AdminLogin15 message type.
MessageArgs< InstrumentDefinitionOption55 > InstrumentDefinitionOption55Args
MessageArgs template instantiation for InstrumentDefinitionOption55 message type. ...
virtual void onEndOfMessage(Handler &, const IncrementalRefreshDailyStatistics49Args &)
Invoked when processing of message of IncrementalRefreshDailyStatistics49 message has ended...
MessageArgs< InstrumentDefinitionFixedIncome57 > InstrumentDefinitionFixedIncome57Args
MessageArgs template instantiation for InstrumentDefinitionFixedIncome57 message type.
virtual void onEndOfMessage(Handler &, const SecurityStatus30Args &)
Invoked when processing of message of SecurityStatus30 message has ended.
virtual void onMessage(Handler &, const QuoteRequest39Args &)
Invoked when processing of QuoteRequest39 message has begun.
virtual void onMessage(Handler &, const IncrementalRefreshDailyStatistics49Args &)
Invoked when processing of IncrementalRefreshDailyStatistics49 message has begun. ...
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionSpread56Args &)
Invoked when processing of message of InstrumentDefinitionSpread56 message has ended.
#define ONIXS_CMEMDHFIX_NAMESPACE_END
Definition: Bootstrap.h:71
MessageArgs< AdminHeartbeat12 > AdminHeartbeat12Args
MessageArgs template instantiation for AdminHeartbeat12 message type.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshOrderBook47Args &)
Invoked when processing of message of IncrementalRefreshOrderBook47 message has ended.
virtual void onPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has begun.
virtual void onEndOfMessage(Handler &, const SnapshotFullRefreshOrderBook53Args &)
Invoked when processing of message of SnapshotFullRefreshOrderBook53 message has ended.
Collection of market data supplied via message processing callbacks.
virtual void onMessage(Handler &, const FIX::MultiContainerArgs &)
Invoked when processing of the FIX message has begun.
MessageArgs< InstrumentDefinitionSpread56 > InstrumentDefinitionSpread56Args
MessageArgs template instantiation for InstrumentDefinitionSpread56 message type. ...
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:67
MessageArgs< IncrementalRefreshSessionStatistics51 > IncrementalRefreshSessionStatistics51Args
MessageArgs template instantiation for IncrementalRefreshSessionStatistics51 message type...
virtual void onMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
Invoked when processing of IncrementalRefreshTradeSummary48 message has begun.
virtual void onMessage(Handler &, const AdminHeartbeat12Args &)
Invoked when processing of AdminHeartbeat12 message has begun.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshBook46Args &)
Invoked when processing of message of IncrementalRefreshBook46 message has ended. ...
MessageArgs< AdminLogout409 > AdminLogout409Args
MessageArgs template instantiation for AdminLogout409 message type.
#define ONIXS_CMEMDH_EXPORTED
Definition: Compiler.h:160
MessageArgs< QuoteRequest39 > QuoteRequest39Args
MessageArgs template instantiation for QuoteRequest39 message type.
MessageArgs< SnapshotFullRefreshOrderBook53 > SnapshotFullRefreshOrderBook53Args
MessageArgs template instantiation for SnapshotFullRefreshOrderBook53 message type.
virtual void onMessage(Handler &, const InstrumentDefinitionOption55Args &)
Invoked when processing of InstrumentDefinitionOption55 message has begun.
virtual void onMessage(Handler &, const AdminHeartbeat410Args &)
Invoked when processing of AdminHeartbeat410 message has begun.
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFixedIncome57Args &)
Invoked when processing of message of InstrumentDefinitionFixedIncome57 message has ended...
MessageArgs< AdminHeartbeat410 > AdminHeartbeat410Args
MessageArgs template instantiation for AdminHeartbeat410 message type.
virtual void onEndOfMessage(Handler &, const FIX::MultiContainerArgs &)
Invoked when processing of the FIX message has ended.
MessageArgs< IncrementalRefreshVolume37 > IncrementalRefreshVolume37Args
MessageArgs template instantiation for IncrementalRefreshVolume37 message type.
MessageArgs< IncrementalRefreshOrderBook47 > IncrementalRefreshOrderBook47Args
MessageArgs template instantiation for IncrementalRefreshOrderBook47 message type.
virtual void onEndOfPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has ended.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
Invoked when processing of message of IncrementalRefreshTradeSummary48 message has ended...
virtual void onMessage(Handler &, const AdminLogout16Args &)
Invoked when processing of AdminLogout16 message has begun.
virtual void onEndOfMessage(Handler &, const AdminLogout16Args &)
Invoked when processing of message of AdminLogout16 message has ended.
MessageArgs< InstrumentDefinitionFuture54 > InstrumentDefinitionFuture54Args
MessageArgs template instantiation for InstrumentDefinitionFuture54 message type. ...
MessageArgs< IncrementalRefreshBook46 > IncrementalRefreshBook46Args
MessageArgs template instantiation for IncrementalRefreshBook46 message type.
MessageArgs< AdminLogin408 > AdminLogin408Args
MessageArgs template instantiation for AdminLogin408 message type.
virtual void onEndOfMessage(Handler &, const QuoteRequest39Args &)
Invoked when processing of message of QuoteRequest39 message has ended.
virtual void onMessage(Handler &, const InstrumentDefinitionFixedIncome57Args &)
Invoked when processing of InstrumentDefinitionFixedIncome57 message has begun.
virtual void onMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
Invoked when processing of IncrementalRefreshSessionStatistics51 message has begun.
virtual void onEndOfMessage(Handler &, const AdminLogin15Args &)
Invoked when processing of message of AdminLogin15 message has ended.
MessageArgs< MultiContainer > MultiContainerArgs
MessageArgs template instantiation for a FIX multi-container.
virtual void onMessage(Handler &, const AdminLogin15Args &)
Invoked when processing of AdminLogin15 message has begun.
virtual void onMessage(Handler &, const ChannelReset4Args &)
Invoked when processing of ChannelReset4 message has begun.
virtual void onMessage(Handler &, const SecurityStatus30Args &)
Invoked when processing of SecurityStatus30 message has begun.
virtual void onEndOfMessage(Handler &, const AdminHeartbeat410Args &)
Invoked when processing of message of AdminHeartbeat410 message has ended.
virtual void onEndOfMessage(Handler &, const ChannelReset4Args &)
Invoked when processing of message of ChannelReset4 message has ended.
virtual void onEndOfMessage(Handler &, const AdminLogin408Args &)
Invoked when processing of message of AdminLogin408 message has ended.
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:68