EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmmConsumer.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_OmmConsumer_h
10 #define __thomsonreuters_ema_access_OmmConsumer_h
11 
116 #include "Access/Include/Common.h"
119 
120 namespace thomsonreuters {
121 
122 namespace ema {
123 
124 namespace access {
125 
126 class EmaString;
127 class OmmConsumerConfig;
128 class OmmConsumerClient;
129 class OmmConsumerErrorClient;
130 class ReqMsg;
131 class PostMsg;
132 class GenericMsg;
133 class TunnelStreamRequest;
134 class ChannelInformation;
135 class OmmConsumerImpl;
136 
138 {
139 public :
140 
144  {
145  InfiniteWaitEnum = -1,
146  NoWaitEnum = 0
147  };
148 
152  {
153  TimeoutEnum = -1,
154  DispatchedEnum = 0
155  };
156 
158 
159 
164  OmmConsumer( const OmmConsumerConfig& config );
165 
167 
173  OmmConsumer(const OmmConsumerConfig& config, OmmConsumerClient& client, void* closure = 0 );
174 
181  OmmConsumer( const OmmConsumerConfig& config, OmmConsumerErrorClient& client );
182 
190  OmmConsumer( const OmmConsumerConfig& config, OmmConsumerClient& adminClient, OmmConsumerErrorClient& errorClient, void* closure = 0 );
192 
194 
195 
197  virtual ~OmmConsumer();
199 
201 
202 
205  const EmaString& getConsumerName() const;
207 
209 
210 
222  UInt64 registerClient( const ReqMsg& reqMsg, OmmConsumerClient& client, void* closure = 0, UInt64 parentHandle = 0 );
223 
234  UInt64 registerClient( const TunnelStreamRequest& tunnelStreamRequest, OmmConsumerClient& client, void* closure = 0 );
235 
247  void reissue( const ReqMsg& reqMsg, UInt64 handle );
248 
256  void submit( const GenericMsg& genericMsg, UInt64 handle );
257 
267  void submit( const PostMsg& postMsg, UInt64 handle );
268 
276  Int64 dispatch( Int64 dispatchTimeout = NoWaitEnum );
277 
283  void unregister( UInt64 handle );
284 
291  void getChannelInformation(ChannelInformation&);
292 
300  void getChannelStatistics(ChannelStatistics&);
301 
309  void modifyIOCtl(Int32 code, Int32 value);
311 
312 private :
313 
314  OmmConsumerImpl* _pImpl;
315 
316  OmmConsumer( const OmmConsumer& );
317  OmmConsumer& operator=( const OmmConsumer& );
318 };
319 
320 }
321 
322 }
323 
324 }
325 
326 #endif // __thomsonreuters_ema_access_OmmConsumer_h
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
OmmConsumerErrorclient class provides callback mechanism used in place of exceptions.
OmmConsumerClient class provides callback interfaces to pass received messages.
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
ReqMsg allows consumer application to express its interest in an item.
Definition: ReqMsg.h:58
OmmConsumerConfig is used to modify configuration and behavior of OmmConsumer.
#define EMA_ACCESS_API
Definition: Common.h:95
OmmConsumer class encapsulates functionality of an Omm consuming type application.
Definition: OmmConsumer.h:137
ChannelInfo provides information on application channel(s).
int Int32
represents 32-bit signed integer
Definition: Common.h:62
GenericMsg allows applications to bidirectionally send messages without any implied message semantics...
Definition: GenericMsg.h:86
Common.h file provides definitions of common variable types used in EMA.
PostMsg allows consumer applications to contribute content.
Definition: PostMsg.h:61
TunnelStreamRequest encapsulates tunnel stream request parameters.
ChannelStats provides statistical information on application channel(s).