EMA C++ Edition
List of all members
refinitiv::ema::access::RefreshMsg Class Reference

RefreshMsg conveys item image, state, permission and group information. More...

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

Public Member Functions

Constructor
 RefreshMsg ()
  More...
 
 RefreshMsg (const RefreshMsg &other)
  More...
 
virtual ~RefreshMsg ()
  More...
 
Accessors
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 hasQos () const
  More...
 
bool hasSeqNum () const
  More...
 
bool hasPartNum () const
  More...
 
bool hasPermissionData () const
  More...
 
bool hasPublisherId () const
  More...
 
bool hasServiceName () const
  More...
 
const OmmStategetState () const
  More...
 
const OmmQosgetQos () const
  More...
 
UInt32 getSeqNum () const
  More...
 
UInt16 getPartNum () const
  More...
 
const EmaBuffergetItemGroup () const
  More...
 
const EmaBuffergetPermissionData () const
  More...
 
UInt32 getPublisherIdUserId () const
  More...
 
UInt32 getPublisherIdUserAddress () const
  More...
 
bool getSolicited () const
  More...
 
bool getDoNotCache () const
  More...
 
bool getComplete () const
  More...
 
bool getClearCache () 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
 
class DictionaryCallbackClient
 
RefreshMsgclear ()
  More...
 
RefreshMsgstreamId (Int32 streamId)
  More...
 
RefreshMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
  More...
 
RefreshMsgname (const EmaString &name)
  More...
 
RefreshMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
  More...
 
RefreshMsgserviceName (const EmaString &serviceName)
  More...
 
RefreshMsgserviceId (UInt32 serviceId)
  More...
 
RefreshMsgid (Int32 id)
  More...
 
RefreshMsgfilter (UInt32 filter)
  More...
 
RefreshMsgqos (UInt32 timeliness=OmmQos::RealTimeEnum, UInt32 rate=OmmQos::TickByTickEnum)
  More...
 
RefreshMsgstate (OmmState::StreamState streamState=OmmState::OpenEnum, OmmState::DataState dataState=OmmState::OkEnum, UInt8 statusCode=0, const EmaString &statusText=EmaString())
  More...
 
RefreshMsgseqNum (UInt32 seqNum)
  More...
 
RefreshMsgpartNum (UInt16 partNum)
  More...
 
RefreshMsgitemGroup (const EmaBuffer &itemGroup)
  More...
 
RefreshMsgpermissionData (const EmaBuffer &permissionData)
  More...
 
RefreshMsgpublisherId (UInt32 userId, UInt32 userAddress)
  More...
 
RefreshMsgattrib (const ComplexType &data)
  More...
 
RefreshMsgpayload (const ComplexType &data)
  More...
 
RefreshMsgextendedHeader (const EmaBuffer &buffer)
  More...
 
RefreshMsgsolicited (bool solicited=false)
  More...
 
RefreshMsgdoNotCache (bool doNotCache=false)
  More...
 
RefreshMsgclearCache (bool clearCache=false)
  More...
 
RefreshMsgcomplete (bool complete=true)
  More...
 
RefreshMsgprivateStream (bool privateStream=false)
  More...
 

Additional Inherited Members

- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 
- 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

RefreshMsg is sent when item data needs to be synchronized. This happens as a response to received ReqMsg or when upstream source requires it. RefreshMsg sent as a response to ReqMsg is called solicited refresh while unsolicited refresh is sent when upstream source requires synchronization of downstream consumers.

The following code snippet shows receiving and processing of RefreshMsg.

class AppClient ; public OmmConsumerClient
{
...
void onRefreshMsg( const RefreshMsg& , const OmmConsumerEvent& );
};
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& event )
{
cout << "Item's handle = " << event.getHandle() << "\n";
if ( refreshMsg.hasName() )
cout << "Item's name = " << refreshMsg.getName() << "\n";
if ( refreshMsg.hasServiceName() )
cout << "Item's name = " << refreshMsg.getServiceName() << "\n";
switch ( refreshMsg.getPayload().getDataTyoe() )
{
decode( refreshMsg.getPayload().getFieldList() );
break;
break;
}
}
Remarks
Calling get***() method on an optional member of RefreshMsg 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 RefreshMsg.
Objects of this class are not cache-able.
Decoding of just encoded RefreshMsg 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 79 of file RefreshMsg.h.

Constructor & Destructor Documentation

◆ RefreshMsg() [1/2]

refinitiv::ema::access::RefreshMsg::RefreshMsg ( )

Constructs RefreshMsg.

◆ RefreshMsg() [2/2]

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

Copy constructor.

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

◆ ~RefreshMsg()

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

Destructor.

Member Function Documentation

◆ attrib()

RefreshMsg& refinitiv::ema::access::RefreshMsg::attrib ( const ComplexType data)

Specifies Attrib.

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

◆ clear()

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

Clears the RefreshMsg.

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

◆ clearCache()

RefreshMsg& refinitiv::ema::access::RefreshMsg::clearCache ( bool  clearCache = false)

Specifies ClearCache.

Parameters
[in]clearCachetrue if cache needs to be cleared; false otherwise (default value is false)
Returns
reference to this object

◆ complete()

RefreshMsg& refinitiv::ema::access::RefreshMsg::complete ( bool  complete = true)

Specifies RefreshComplete.

Parameters
[in]completetrue if this is the last part of multi part refresh or single part refresh; false otherwise (default value is true)
Returns
reference to this object

◆ domainType()

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

Specifies DomainType.

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

◆ doNotCache()

RefreshMsg& refinitiv::ema::access::RefreshMsg::doNotCache ( bool  doNotCache = false)

Specifies DoNotCache.

Parameters
[in]doNotCachetrue if this refresh must not be cached; false otherwise (default value is false)
Returns
reference to this object

◆ extendedHeader()

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

Specifies ExtendedHeader.

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

◆ filter()

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

Specifies Filter.

Parameters
[in]filterspecifies Filter
Returns
reference to this object

◆ getAsHex()

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

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

Returns
a buffer with the message hex information

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

◆ getClearCache()

bool refinitiv::ema::access::RefreshMsg::getClearCache ( ) const

Returns ClearCache.

Returns
true if cache needs to be cleared before applying this refresh; false otherwise

◆ getCode()

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

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

Returns
Data::NoCodeEnum

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

◆ getComplete()

bool refinitiv::ema::access::RefreshMsg::getComplete ( ) const

Returns Complete.

Returns
true if this is the last part of the multi part refresh message

◆ getDataType()

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

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

Returns
DataType::RefeshMsgEnum

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

◆ getDoNotCache()

bool refinitiv::ema::access::RefreshMsg::getDoNotCache ( ) const

Returns DoNotCache.

Returns
true if this refresh must not be cached; false otherwise

◆ getItemGroup()

const EmaBuffer& refinitiv::ema::access::RefreshMsg::getItemGroup ( ) const

Returns ItemGroup.

Returns
EmaBuffer containing item group information

◆ getPartNum()

UInt16 refinitiv::ema::access::RefreshMsg::getPartNum ( ) const

Returns PartNum.

Exceptions
OmmInvalidUsageExceptionif hasPartNum() returns false
Returns
part number

◆ getPermissionData()

const EmaBuffer& refinitiv::ema::access::RefreshMsg::getPermissionData ( ) const

Returns PermissionData.

Exceptions
OmmInvalidUsageExceptionif hasPermissionData() returns false
Returns
EmaBuffer containing permission data

◆ getPrivateStream()

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

Returns PrivateStream. @retturn true if this is private stream item

◆ getPublisherIdUserAddress()

UInt32 refinitiv::ema::access::RefreshMsg::getPublisherIdUserAddress ( ) const

Returns PublisherIdUserAddress.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user address

◆ getPublisherIdUserId()

UInt32 refinitiv::ema::access::RefreshMsg::getPublisherIdUserId ( ) const

Returns PublisherIdUserId.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user Id

◆ getQos()

const OmmQos& refinitiv::ema::access::RefreshMsg::getQos ( ) const

Returns Qos.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos of item

◆ getSeqNum()

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

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number

◆ getServiceName()

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

Returns the ServiceName within the MsgKey.

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

◆ getSolicited()

bool refinitiv::ema::access::RefreshMsg::getSolicited ( ) const

Returns Solicited.

Returns
true if this is solicited refresh; false otherwise

◆ getState()

const OmmState& refinitiv::ema::access::RefreshMsg::getState ( ) const

Returns State.

Returns
state of item (e.g. Open / Ok)

◆ hasPartNum()

bool refinitiv::ema::access::RefreshMsg::hasPartNum ( ) const

Indicates presence of PartNum.

Remarks
part number is an optional member of RefreshMsg
Returns
true if part number is set; false otherwise

◆ hasPermissionData()

bool refinitiv::ema::access::RefreshMsg::hasPermissionData ( ) const

Indicates presence of PermissionData.

Remarks
permission data is optional member of RefreshMsg
Returns
true if permission data is set; false otherwise

◆ hasPublisherId()

bool refinitiv::ema::access::RefreshMsg::hasPublisherId ( ) const

Indicates presence of PublisherId.

Remarks
publisher id is an optional member of RefreshMsg
Returns
true if publisher id is set; false otherwise

◆ hasQos()

bool refinitiv::ema::access::RefreshMsg::hasQos ( ) const

Indicates presence of Qos.

Remarks
Qos is an optional member of RefreshMsg
Returns
true if Qos is set; false otherwise

◆ hasSeqNum()

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

Indicates presence of SeqNum.

Remarks
sequence number (SeqNum) is an optional member of RefreshMsg
Returns
true if sequence number is set; false otherwise

◆ hasServiceName()

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

Indicates presence of the ServiceName within the MsgKey.

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

◆ id()

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

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object

◆ itemGroup()

RefreshMsg& refinitiv::ema::access::RefreshMsg::itemGroup ( const EmaBuffer itemGroup)

Specifies ItemGroup.

Parameters
[in]itemGroupan EmaBuffer object with item group information
Returns
reference to this object

◆ name()

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

Specifies Name.

Parameters
[in]namean EmaString object containing item name
Returns
reference to this object

◆ nameType()

RefreshMsg& refinitiv::ema::access::RefreshMsg::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

◆ partNum()

RefreshMsg& refinitiv::ema::access::RefreshMsg::partNum ( UInt16  partNum)

Specifies PartNum.

Parameters
[in]partNumspecifies part number
Returns
reference to this object

◆ payload()

RefreshMsg& refinitiv::ema::access::RefreshMsg::payload ( const ComplexType data)

Specifies Payload.

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

◆ permissionData()

RefreshMsg& refinitiv::ema::access::RefreshMsg::permissionData ( const EmaBuffer permissionData)

Specifies PermissionData.

Parameters
[in]permissionDataan EmaBuffer object with permission data information
Returns
reference to this object

◆ privateStream()

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

Specifies PrivateStream.

Parameters
[in]privateStreamtrue if private stream; false otherwise (default value is false)
Returns
reference to this object

◆ publisherId()

RefreshMsg& refinitiv::ema::access::RefreshMsg::publisherId ( UInt32  userId,
UInt32  userAddress 
)

Specifies PublisherId.

Parameters
[in]UserIdspecifies publisher's user id
[in]UserAddressspecifies publisher's user address
Returns
reference to this object

◆ qos()

RefreshMsg& refinitiv::ema::access::RefreshMsg::qos ( UInt32  timeliness = OmmQos::RealTimeEnum,
UInt32  rate = OmmQos::TickByTickEnum 
)

Specifies Qos.

Parameters
[in]timelinessspecifies Qos Timeliness (default value is OmmQos::RealTimeEnum)
[in]ratespecifies Qos rate (default value is OmmQos::TickByTickEnum)
Returns
reference to this object

◆ seqNum()

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

Specifies SeqNum.

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

◆ serviceId()

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

Specifies ServiceId.

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

◆ serviceName()

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

Specifies ServiceName.

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

◆ solicited()

RefreshMsg& refinitiv::ema::access::RefreshMsg::solicited ( bool  solicited = false)

Specifies Solicited.

Parameters
[in]solicitedtrue if this refresh is solicited; false otherwise (default value is false)
Returns
reference to this object

◆ state()

RefreshMsg& refinitiv::ema::access::RefreshMsg::state ( OmmState::StreamState  streamState = OmmState::OpenEnum,
OmmState::DataState  dataState = OmmState::OkEnum,
UInt8  statusCode = 0,
const EmaString statusText = EmaString() 
)

Specifies State.

Parameters
[in]streamStateconveys item stream state value (default value is OmmState::OpenEnum)
[in]dataStateconveys item data state value (default value is OmmState::SuspectEnum)
[in]statusCodeconveys specific item state code (default value is OmmState::NoneEnum)
[in]statusTextconveys item status explanation (default value is 'empty string')
Returns
reference to this object

◆ streamId()

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

Specifies StreamId.

Parameters
[in]idstream id
Returns
reference to this object

◆ toString() [1/2]

const EmaString& refinitiv::ema::access::RefreshMsg::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::RefreshMsg::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