EMA C++ Edition
List of all members | Public Types
refinitiv::ema::access::AckMsg Class Reference

AckMsg indicates success or failure of PostMsg. More...

Inheritance diagram for refinitiv::ema::access::AckMsg:
refinitiv::ema::access::Msg refinitiv::ema::access::ComplexType refinitiv::ema::access::Data

Public Types

enum  NackCode {
  NoneEnum = 0 ,
  AccessDeniedEnum = 1 ,
  DeniedBySourceEnum = 2 ,
  SourceDownEnum = 3 ,
  SourceUnknownEnum = 4 ,
  NoResourcesEnum = 5 ,
  NoResponseEnum = 6 ,
  GatewayDownEnum = 7 ,
  SymbolUnknownEnum = 10 ,
  NotOpenEnum = 11 ,
  InvalidContentEnum = 12
}
 
- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 

Public Member Functions

Constructor
 AckMsg ()
  More...
 
 AckMsg (const AckMsg &other)
  More...
 
Destructor
virtual ~AckMsg ()
  More...
 
Accessors
const EmaStringgetNackCodeAsString () const
  More...
 
DataType::DataTypeEnum getDataType () const
  More...
 
Data::DataCode getCode () const
  More...
 
const EmaBuffergetAsHex () const
  More...
 
const EmaStringtoString () const
  More...
 
const EmaStringtoString (const refinitiv::ema::rdm::DataDictionary &dictionary) const
  More...
 
bool hasSeqNum () const
  More...
 
bool hasNackCode () const
  More...
 
bool hasText () const
  More...
 
bool hasServiceName () const
  More...
 
UInt32 getSeqNum () const
  More...
 
UInt32 getAckId () const
  More...
 
UInt8 getNackCode () const
  More...
 
const EmaStringgetText () const
  More...
 
bool getPrivateStream () const
  More...
 
const EmaStringgetServiceName () const
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::Msg
bool hasMsgKey () const
  More...
 
bool hasName () const
  More...
 
bool hasNameType () const
  More...
 
bool hasServiceId () const
  More...
 
bool hasId () const
  More...
 
bool hasFilter () const
  More...
 
bool hasExtendedHeader () const
  More...
 
Int32 getStreamId () const
  More...
 
UInt16 getDomainType () const
  More...
 
const EmaStringgetName () const
  More...
 
UInt8 getNameType () const
  More...
 
UInt32 getServiceId () const
  More...
 
Int32 getId () const
  More...
 
UInt32 getFilter () const
  More...
 
const EmaBuffergetExtendedHeader () const
  More...
 
const AttribgetAttrib () const
  More...
 
const PayloadgetPayload () const
  More...
 
virtual ~Msg ()
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::ComplexType
virtual ~ComplexType ()
  More...
 
- Public Member Functions inherited from refinitiv::ema::access::Data
const EmaStringgetCodeAsString () const
  More...
 
 operator const char * () const
  More...
 
virtual ~Data ()
  More...
 

Operations

class ItemCallbackClient
 
AckMsgclear ()
  More...
 
AckMsgstreamId (Int32 streamId)
  More...
 
AckMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
  More...
 
AckMsgname (const EmaString &name)
  More...
 
AckMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
  More...
 
AckMsgserviceName (const EmaString &serviceName)
  More...
 
AckMsgserviceId (UInt32 serviceId)
  More...
 
AckMsgid (Int32 id)
  More...
 
AckMsgfilter (UInt32 filter)
  More...
 
AckMsgseqNum (UInt32 seqNum)
  More...
 
AckMsgackId (UInt32 postId)
  More...
 
AckMsgnackCode (UInt8 nackCode)
  More...
 
AckMsgtext (const EmaString &text)
  More...
 
AckMsgattrib (const ComplexType &attrib)
  More...
 
AckMsgpayload (const ComplexType &payload)
  More...
 
AckMsgextendedHeader (const EmaBuffer &buffer)
  More...
 
AckMsgprivateStream (bool privateStream=false)
  More...
 

Additional Inherited Members

- Protected Member Functions inherited from refinitiv::ema::access::Msg
 Msg ()
 
const Encoder & getEncoder () const
  More...
 
bool hasEncoder () const
  More...
 
void setDecoder (MsgDecoder *)
 
bool hasDecoder () const
  More...
 
- Protected Member Functions inherited from refinitiv::ema::access::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from refinitiv::ema::access::Data
 Data ()
 
- Protected Attributes inherited from refinitiv::ema::access::Msg
MsgDecoder_pDecoder
 
MsgEncoder * _pEncoder
 
Attrib _attrib
 
Payload _payload
 

Detailed Description

If requested, AckMsg is sent by provider acting on PostMsg received from consumer. AckMsg indicates success or failure of caching / processing of received PostMsg. AckMsg is optional. Consumer requests provider to send AckMsg by calling PostMsg::solicitAck( true ).

The following code snippet shows processing of received AckMsg.

class AppClient : public OmmConsumerClient
{
...
void onAckMsg( const AckMsg& , const OmmConsumerEvent& );
};
void AppClient::onAckMsg( const AckMsg& ackMsg, const OmmConsumerEvent& )
{
if ( ackMsg.hasName() )
cout << ackMsg.getName() << "\n";
if ( ackMsg.hasServiceName() )
cout << ackMsg.getServiceName() << "\n";
if ( ackMsg.hasNackCode() )
cout << ackMsg.getNackCodeAsString() << "\n";
}
Remarks
Calling get***() method on an optional member of AcMsg must be preceded by a call to respective has***() method.
Objects of this class are intended to be short lived or rather transitional.
This class is designed to efficiently perform setting and getting of information from AckMsg.
Objects of this class are not cache-able.
Decoding of just encoded AckMsg in the same application is not supported.
All methods in this class are Lock-free Method.
See also
Data, Msg, EmaString, EmaBuffer

Definition at line 68 of file AckMsg.h.

Member Enumeration Documentation

◆ NackCode

An enumeration representing negative acknowledgement code.

Enumerator
NoneEnum 

Indicates no nack code

AccessDeniedEnum 

Indicates access denied

DeniedBySourceEnum 

Indicates denied by source

SourceDownEnum 

Indicates source is down

SourceUnknownEnum 

Indicates source is unknown

NoResourcesEnum 

Indicates no resources

NoResponseEnum 

Indicates no response

GatewayDownEnum 

Indicates gateway down

SymbolUnknownEnum 

Indicates unknown symbol

NotOpenEnum 

Indicates not open

InvalidContentEnum 

Indicates invalid content

Definition at line 75 of file AckMsg.h.

Constructor & Destructor Documentation

◆ AckMsg() [1/2]

refinitiv::ema::access::AckMsg::AckMsg ( )

Constructs AckMsg.

◆ AckMsg() [2/2]

refinitiv::ema::access::AckMsg::AckMsg ( const AckMsg other)

Copy constructor.

Remarks
this is used to copy and process AckMsg outside of EMA's callback methods.
this method does not support passing in just encoded AckMsg in the application space.

◆ ~AckMsg()

virtual refinitiv::ema::access::AckMsg::~AckMsg ( )
virtual

Destructor.

Member Function Documentation

◆ ackId()

AckMsg& refinitiv::ema::access::AckMsg::ackId ( UInt32  postId)

Specifies AckId.

Parameters
[in]postIdspecifies related post id
Returns
reference to this object

◆ attrib()

AckMsg& refinitiv::ema::access::AckMsg::attrib ( const ComplexType attrib)

Specifies Attrib.

Parameters
[in]attriban object of ComplexType
Returns
reference to this object

◆ clear()

AckMsg& refinitiv::ema::access::AckMsg::clear ( )

Clears the AckMsg.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object

◆ domainType()

AckMsg& refinitiv::ema::access::AckMsg::domainType ( UInt16  domainType = rdm::MMT_MARKET_PRICE)

Specifies DomainType.

Exceptions
OmmUnsupportedDomainTypeExceptionif domainType is greater than 255
Parameters
[in]domainTypespecifies RDM Message Model Type (default value is rdm::MMT_MARKET_PRICE)
Returns
reference to this object

◆ extendedHeader()

AckMsg& refinitiv::ema::access::AckMsg::extendedHeader ( const EmaBuffer buffer)

Specifies ExtendedHeader.

Parameters
[in]bufferan EmaBuffer containing extendedHeader information
Returns
reference to this object

◆ filter()

AckMsg& refinitiv::ema::access::AckMsg::filter ( UInt32  filter)

Specifies Filter.

Parameters
[in]filterspecifies filter
Returns
reference to this object

◆ getAckId()

UInt32 refinitiv::ema::access::AckMsg::getAckId ( ) const

Returns the AckId.

Returns
ack id

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::AckMsg::getAsHex ( ) const
virtual

Returns a buffer that in turn provides an alphanumeric null-terminated hexadecimal string representation.

Returns
EmaBuffer with the message hex information

Implements refinitiv::ema::access::Data.

◆ getCode()

Data::DataCode refinitiv::ema::access::AckMsg::getCode ( ) const
virtual

Returns the Code, which indicates a special state of a DataType.

Returns
Data::NoCodeEnum

Implements refinitiv::ema::access::Data.

◆ getDataType()

DataType::DataTypeEnum refinitiv::ema::access::AckMsg::getDataType ( ) const
virtual

Returns the DataType, which is the type of Omm data. Results in this class type.

Returns
DataType::AckMsgEnum

Implements refinitiv::ema::access::Data.

◆ getNackCode()

UInt8 refinitiv::ema::access::AckMsg::getNackCode ( ) const

Returns NackCode.

Exceptions
OmmInvalidUsageExceptionif hasNackCode() returns false
Returns
NackCode

◆ getNackCodeAsString()

const EmaString& refinitiv::ema::access::AckMsg::getNackCodeAsString ( ) const

Returns the NackCode value as a string format.

Returns
string representation of this object's NackCode

◆ getPrivateStream()

bool refinitiv::ema::access::AckMsg::getPrivateStream ( ) const

Returns PrivateStream.

Returns
true if this is a private stream; false otherwise

◆ getSeqNum()

UInt32 refinitiv::ema::access::AckMsg::getSeqNum ( ) const

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number

◆ getServiceName()

const EmaString& refinitiv::ema::access::AckMsg::getServiceName ( ) const

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
EmaString containing service name

◆ getText()

const EmaString& refinitiv::ema::access::AckMsg::getText ( ) const

Returns Text.

Exceptions
OmmInvalidUsageExceptionif hasText() returns false
Returns
text

◆ hasNackCode()

bool refinitiv::ema::access::AckMsg::hasNackCode ( ) const

Indicates presence of NackCode.

Remarks
negative acknowledgement code is an optional member of AckMsg
Returns
true if NackCode is set; false otherwise

◆ hasSeqNum()

bool refinitiv::ema::access::AckMsg::hasSeqNum ( ) const

Indicates presence of SeqNum.

Remarks
sequence number is an optional member of AckMsg
Returns
true if sequence number is set; false otherwise

◆ hasServiceName()

bool refinitiv::ema::access::AckMsg::hasServiceName ( ) const

Indicates presence of the ServiceName within the MsgKey.

Remarks
service name is an optional member of AckMsg
Returns
true if service name is set; false otherwise

◆ hasText()

bool refinitiv::ema::access::AckMsg::hasText ( ) const

Indicates presence of Text.

Remarks
Text is an optional member of AckMsg
Returns
true if text is set; false otherwise

◆ id()

AckMsg& refinitiv::ema::access::AckMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object

◆ nackCode()

AckMsg& refinitiv::ema::access::AckMsg::nackCode ( UInt8  nackCode)

Specifies NackCode.

Parameters
[in]nackCodea negative acknowledgement code
Returns
reference to this object

◆ name()

AckMsg& refinitiv::ema::access::AckMsg::name ( const EmaString name)

Specifies Name.

Parameters
[in]namespecifies item name
Returns
reference to this object

◆ nameType()

AckMsg& refinitiv::ema::access::AckMsg::nameType ( UInt8  nameType = rdm::INSTRUMENT_NAME_RIC)

Specifies NameType.

Parameters
[in]nameTypespecifies RDM Instrument NameType (default value is rdm::INSTRUMENT_NAME_RIC)
Returns
reference to this object

◆ payload()

AckMsg& refinitiv::ema::access::AckMsg::payload ( const ComplexType payload)

Specifies Payload.

Parameters
[in]payloadan object of ComplexType
Returns
reference to this object

◆ privateStream()

AckMsg& refinitiv::ema::access::AckMsg::privateStream ( bool  privateStream = false)

Specifies PrivateStream.

Parameters
[in]privateStreamspecifies if this is a private stream (default is false)
Returns
reference to this object

◆ seqNum()

AckMsg& refinitiv::ema::access::AckMsg::seqNum ( UInt32  seqNum)

Specifies SeqNum.

Parameters
[in]seqNumspecifies sequence number
Returns
reference to this object

◆ serviceId()

AckMsg& refinitiv::ema::access::AckMsg::serviceId ( UInt32  serviceId)

Specifies ServiceId.

Exceptions
OmmInvalidUsageExceptionif service name is already set
Parameters
[in]serviceIdspecifies service id
Returns
reference to this object

◆ serviceName()

AckMsg& refinitiv::ema::access::AckMsg::serviceName ( const EmaString serviceName)

Specifies ServiceName.

Exceptions
OmmInvalidUsageExceptionif service id is already set
Parameters
[in]serviceNamespecifies service name
Returns
reference to this object

◆ streamId()

AckMsg& refinitiv::ema::access::AckMsg::streamId ( Int32  streamId)

Specifies StreamId.

Parameters
[in]streamIdspecifies stream id
Returns
reference to this object

◆ text()

AckMsg& refinitiv::ema::access::AckMsg::text ( const EmaString text)

Specifies Text.

Parameters
[in]textspecifies message text information
Returns
reference to this object

◆ toString() [1/2]

const EmaString& refinitiv::ema::access::AckMsg::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements refinitiv::ema::access::Data.

◆ toString() [2/2]

const EmaString& refinitiv::ema::access::AckMsg::toString ( const refinitiv::ema::rdm::DataDictionary dictionary) const

Returns a string representation of the class instance for just encoded object.

Parameters
[in]dictionaryuse for toString() conversion
Returns
string representation of the class instance