EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TunnelStreamRequest.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_TunnelStreamRequest_h
10 #define __thomsonreuters_ema_access_TunnelStreamRequest_h
11 
12 #include "EmaString.h"
13 
14 namespace thomsonreuters {
15 
16 namespace ema {
17 
18 namespace access {
19 
20 class ReqMsg;
21 class TunnelStreamLoginReqMsgImpl;
22 
32 {
33 public :
34 
36 
37 
40  CosCommon();
41 
45  CosCommon( const CosCommon& other );
47 
49 
50 
52  virtual ~CosCommon();
54 
56 
57 
61  CosCommon& operator=( const CosCommon& other);
62 
66  CosCommon& clear();
67 
74  CosCommon& maxMsgSize( UInt64 maxMsgSize = 6144 );
76 
78 
79 
82  UInt64 getMaxMsgSize() const;
84 
85 private :
86 
87  UInt64 _maxMsgSize;
88 };
89 
99 {
100 public :
101 
106  NotRequiredEnum = 0,
107  OmmLoginEnum = 1
108  };
109 
111 
112 
115 
119  CosAuthentication( const CosAuthentication& other );
121 
123 
124 
126  virtual ~CosAuthentication();
128 
130 
131 
135  CosAuthentication& operator=( const CosAuthentication& other );
136 
140  CosAuthentication& clear();
141 
147  CosAuthentication& type( CosAuthenticationType type = NotRequiredEnum );
149 
151 
152 
155  CosAuthenticationType getType() const;
157 
158 private :
159 
160  CosAuthenticationType _type;
161 };
162 
172 {
173 public :
174 
179  NoneEnum = 0,
180  BidirectionalEnum = 1
181  };
182 
184 
185 
187  CosFlowControl();
188 
192  CosFlowControl( const CosFlowControl& other );
194 
196 
197 
199  virtual ~CosFlowControl();
201 
203 
204 
208  CosFlowControl& operator=( const CosFlowControl& other );
209 
213  CosFlowControl& clear();
214 
220  CosFlowControl& type( CosFlowControlType type = NoneEnum );
221 
230  CosFlowControl& recvWindowSize( Int64 size = -1 );
231 
239  CosFlowControl& sendWindowSize( Int64 size );
241 
243 
244 
247  CosFlowControlType getType() const;
248 
252  Int64 getRecvWindowSize() const;
253 
257  Int64 getSendWindowSize() const;
259 
260 private :
261 
262  CosFlowControlType _type;
263  Int64 _recvWindowSize;
264  Int64 _sendWindowSize;
265 };
266 
276 {
277 public :
278 
283  BestEffortEnum = 0,
284  ReliableEnum = 1
285  };
286 
288 
289 
292 
296  CosDataIntegrity( const CosDataIntegrity& other );
298 
300 
301 
303  virtual ~CosDataIntegrity();
305 
307 
308 
312  CosDataIntegrity& operator=( const CosDataIntegrity& other );
313 
317  CosDataIntegrity& clear();
318 
324  CosDataIntegrity& type( CosDataIntegrityType type = BestEffortEnum );
326 
328 
329 
332  CosDataIntegrityType getType() const;
334 
335 private :
336 
337  CosDataIntegrityType _type;
338 };
339 
349 {
350 public :
351 
356  NoneEnum = 0,
357  PersistentQueueEnum = 1
358  };
359 
361 
362 
364  CosGuarantee();
365 
369  CosGuarantee( const CosGuarantee& other);
371 
373 
374 
376  virtual ~CosGuarantee();
378 
380 
381 
385  CosGuarantee& operator=( const CosGuarantee& other );
386 
390  CosGuarantee& clear();
391 
397  CosGuarantee& type( CosGuaranteeType type = NoneEnum );
398 
404  CosGuarantee& persistLocally( bool persistLocally = true );
405 
411  CosGuarantee& persistenceFilePath( const EmaString& filePath = EmaString() );
413 
415 
416 
419  CosGuaranteeType getType() const;
420 
424  bool getPersistLocally() const;
425 
429  const EmaString& getPersistenceFilePath() const;
431 
432 private :
433 
434  CosGuaranteeType _type;
435  bool _persistLocally;
436  EmaString _filePath;
437 };
438 
454 {
455 public :
456 
458 
459 
461  ClassOfService();
462 
466  ClassOfService( const ClassOfService& other );
468 
470 
471 
473  virtual ~ClassOfService();
475 
477 
478 
482  ClassOfService& operator=( const ClassOfService& other );
483 
487  ClassOfService& clear();
488 
493  ClassOfService& common( const CosCommon& cosCommon );
494 
499  ClassOfService& authentication( const CosAuthentication& cosAuthentication );
500 
505  ClassOfService& flowControl( const CosFlowControl& cosFlowControl );
506 
511  ClassOfService& dataIntegrity( const CosDataIntegrity& cosDataIntegrity );
512 
517  ClassOfService& guarantee( const CosGuarantee& cosGuarantee );
519 
521 
522 
525  const CosCommon& getCommon() const;
526 
530  const CosAuthentication& getAuthentication() const;
531 
535  const CosFlowControl& getFlowControl() const;
536 
540  const CosDataIntegrity& getDataIntegrity() const;
541 
545  const CosGuarantee& getGuarantee() const;
547 
548 private :
549 
550  CosCommon _common;
551  CosAuthentication _authentication;
552  CosFlowControl _flowControl;
553  CosDataIntegrity _dataIntegrity;
554  CosGuarantee _guarantee;
555 };
556 
587 {
588 public :
589 
591 
592 
595 
601 
603 
604 
606  virtual ~TunnelStreamRequest();
608 
610 
611 
615  TunnelStreamRequest& operator=( const TunnelStreamRequest& other );
616 
620  TunnelStreamRequest& clear();
621 
627  TunnelStreamRequest& domainType( UInt8 domainType );
628 
635  TunnelStreamRequest& serviceId( UInt32 serviceId );
636 
643  TunnelStreamRequest& serviceName( const EmaString& serviceName );
644 
649  TunnelStreamRequest& name( const EmaString& name );
650 
655  TunnelStreamRequest& responseTimeout( UInt32 timeout = 60 );
656 
661  TunnelStreamRequest& guaranteedOutputBuffers( UInt32 value = 50 );
662 
667  TunnelStreamRequest& classOfService( const ClassOfService& cos );
668 
674  TunnelStreamRequest& loginReqMsg( const ReqMsg& loginReq );
676 
678 
679 
682  bool hasServiceId() const;
683 
687  bool hasServiceName() const;
688 
692  bool hasName() const;
693 
697  bool hasLoginReqMsg() const;
698 
702  UInt16 getDomainType() const;
703 
708  UInt32 getServiceId() const;
709 
714  const EmaString& getServiceName() const;
715 
720  const EmaString& getName() const;
721 
725  UInt32 getResponseTimeOut() const;
726 
730  UInt32 getGuaranteedOutputBuffers() const;
731 
735  const ClassOfService& getClassOfService() const;
736 
741  const ReqMsg& getLoginReqMsg() const;
743 
744 private :
745 
746  friend class TunnelItem;
747 
748  UInt8 _domainType;
749  UInt32 _serviceId;
750  UInt32 _responseTimeout;
751  UInt32 _guaranteedOutputBuffers;
752  bool _serviceIdSet;
753  bool _serviceNameSet;
754  bool _nameSet;
755  EmaString _serviceName;
756  EmaString _name;
757  ClassOfService _cos;
758  TunnelStreamLoginReqMsgImpl* _pImpl;
759 };
760 
761 };
762 
763 };
764 
765 };
766 
767 #endif // __thomsonreuters_ema_access_TunnelStreamRequest_h
long long Int64
represents 64-bit signed integer
Definition: Common.h:74
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
CosGuarantee encapsulates guarantee member of the ClassOfService class.
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
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
#define EMA_ACCESS_API
Definition: Common.h:95
CosFlowControl encapsulates flow control member of the ClassOfService class.
CosCommon encapsulates common member of the ClassOfService class.
CosDataIntegrity encapsulates data integrity member of the ClassOfService class.
CosAuthentication encapsulates authentication member of the ClassOfService class. ...
ClassOfService encapsulates behaviours of tunnel stream.
TunnelStreamRequest encapsulates tunnel stream request parameters.
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32