EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ChannelInformation.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-2020 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_ChannelInformation_h
10 #define __thomsonreuters_ema_access_ChannelInformation_h
11 
30 
31 namespace thomsonreuters {
32 
33 namespace ema {
34 
35 namespace access {
36 
37 class EmaString;
38 
40 {
41 public:
42 
47  {
48  ClosedEnum = -1,
49  InactiveEnum = 0,
50  InitializingEnum = 1,
51  ActiveEnum = 2,
52  };
53 
58  {
59  Unidentified = -1,
60  SocketEnum = 0,
61  EncryptedEnum = 1,
62  HttpEnum = 2,
63  Unidir_ShmemEnum = 3,
64  Reliable_McastEnum = 4,
68  Ext_Line_SocketEnum = 5,
69  Seq_McastEnum = 6,
73  WebSocketEnum = 7,
74  };
75 
80  {
81  UnknownEnum = -1,
82  RwfEnum = 0,
83  RsslJsonEnum = 2
84  };
85 
90  {
91  NoneEnum = 0x00,
92  ZLIBEnum = 0x01,
93  LZ4Enum = 0x02
94  };
95 
97 
98 
102 
103 
105 
106 
117  ChannelInformation( const EmaString& connectedComponentInfo,
118  const EmaString& hostname, const EmaString& ipAddress,
119  const ChannelState channelState, const ConnectionType connectionType,
120  const ProtocolType protocolType, const UInt32 majorVersion,
121  const UInt32 minorVersion, const UInt32 pingTimeout );
123 
125 
126 
128  virtual ~ChannelInformation();
130 
132 
133 
136  void clear();
137 
141  const EmaString& getConnectedComponentInfo() const { return _connectedComponentInfo; }
142 
147  const EmaString& getHostname() const { return _hostname; }
148 
153  const UInt16 port() const { return _port; }
154 
160  const EmaString& getIPaddress() const { return _ipAddress; }
161 
165  ChannelState getChannelState() const { return _channelState; }
166 
170  ConnectionType getConnectionType() const { return _connectionType; }
171 
175  ProtocolType getProtocolType() const { return _protocolType; }
176 
180  UInt32 getMajorVersion() const { return _majorVersion; }
181 
185  UInt32 getMinorVersion() const { return _minorVersion; }
186 
190  UInt32 getPingTimeout() const { return _pingTimeout; }
191 
195  UInt32 getMaxFragmentSize() const { return _maxFragmentSize; }
196 
200  UInt32 getMaxOutputBuffers() const { return _maxOutputBuffers; }
201 
205  UInt32 getGuaranteedOutputBuffers() const { return _guaranteedOutputBuffers; }
206 
210  UInt32 getNumInputBuffers() const { return _numInputBuffers; }
211 
215  UInt32 getSysSendBufSize() const { return _sysSendBufSize; }
216 
220  UInt32 getSysRecvBufSize() const { return _sysRecvBufSize; }
221 
225  CompressionType getCompressionType() const { return _compressionType; }
226 
230  UInt32 getCompressionThreshold() const { return _compressionThreshold; }
231 
235  UInt64 getEncryptionProtocol() const { return _encryptionProtocol; }
236 
240  const EmaString& toString() const;
241 
246  operator const char* () const;
247 
249 
251 
252 
256  ChannelInformation& hostname(const EmaString& hostname);
257 
262  ChannelInformation& port(const UInt16 port);
263 
268  ChannelInformation& ipAddress(const EmaString& ipAddress);
269 
274  ChannelInformation& connectedComponentInfo(const EmaString& connectedComponentInfo);
275 
280  ChannelInformation& channelState(ChannelState channelState);
281 
286  ChannelInformation& connectionType(ConnectionType connectionType);
287 
292  ChannelInformation& protocolType(ProtocolType protocolType);
293 
298  ChannelInformation& majorVersion(UInt32 majorVersion);
299 
304  ChannelInformation& minorVersion(UInt32 minorVersion);
305 
310  ChannelInformation& pingTimeout(UInt32 pingTimeout);
311 
316  ChannelInformation& maxFragmentSize(UInt32 maxFragmentSize);
317 
322  ChannelInformation& maxOutputBuffers(UInt32 maxOutputBuffers);
323 
328  ChannelInformation& guaranteedOutputBuffers(UInt32 guaranteedOutputBuffers);
329 
334  ChannelInformation& numInputBuffers(UInt32 numInputBuffers);
335 
340  ChannelInformation& sysSendBufSize(UInt32 sysSendBufSize);
341 
346  ChannelInformation& sysRecvBufSize(UInt32 sysRecvBufSize);
347 
352  ChannelInformation& compressionType(UInt32 compressionType);
353 
358  ChannelInformation& compressionThreshold(UInt32 compressionThreshold);
359 
364  ChannelInformation& encryptionProtocol(UInt64 encryptionProtocol);
366 
367 private:
368  ChannelState _channelState;
369  ConnectionType _connectionType;
370  EmaString _hostname;
371  EmaString _ipAddress;
372  UInt16 _port;
373  EmaString _connectedComponentInfo;
374  ProtocolType _protocolType;
375  UInt32 _majorVersion;
376  UInt32 _minorVersion;
377  UInt32 _pingTimeout;
378  UInt32 _maxFragmentSize;
379  UInt32 _maxOutputBuffers;
380  UInt32 _guaranteedOutputBuffers;
381  UInt32 _numInputBuffers;
382  UInt32 _sysSendBufSize;
383  UInt32 _sysRecvBufSize;
384  CompressionType _compressionType;
385  UInt32 _compressionThreshold;
386  UInt64 _encryptionProtocol;
387  mutable EmaString _toString;
388 };
389 
390 }
391 
392 }
393 
394 }
395 
396 #endif //__thomsonreuters_ema_access_ChannelInformation_h
397 
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
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
#define EMA_ACCESS_API
Definition: Common.h:95
ChannelInfo provides information on application channel(s).