EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Friends
thomsonreuters::ema::access::RefreshMsg Class Reference

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

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

Public Member Functions

Constructor
 RefreshMsg ()
 
 RefreshMsg (const RefreshMsg &other)
 
virtual ~RefreshMsg ()
 
Accessors
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
bool hasQos () const
 
bool hasSeqNum () const
 
bool hasPartNum () const
 
bool hasPermissionData () const
 
bool hasPublisherId () const
 
bool hasServiceName () const
 
const OmmStategetState () const
 
const OmmQosgetQos () const
 
UInt32 getSeqNum () const
 
UInt16 getPartNum () const
 
const EmaBuffergetItemGroup () const
 
const EmaBuffergetPermissionData () const
 
UInt32 getPublisherIdUserId () const
 
UInt32 getPublisherIdUserAddress () const
 
bool getSolicited () const
 
bool getDoNotCache () const
 
bool getComplete () const
 
bool getClearCache () const
 
bool getPrivateStream () const
 
const EmaStringgetServiceName () const
 
Operations
RefreshMsgclear ()
 
RefreshMsgstreamId (Int32 streamId)
 
RefreshMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
 
RefreshMsgname (const EmaString &name)
 
RefreshMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
 
RefreshMsgserviceName (const EmaString &serviceName)
 
RefreshMsgserviceId (UInt32 serviceId)
 
RefreshMsgid (Int32 id)
 
RefreshMsgfilter (UInt32 filter)
 
RefreshMsgqos (UInt32 timeliness=OmmQos::RealTimeEnum, UInt32 rate=OmmQos::TickByTickEnum)
 
RefreshMsgstate (OmmState::StreamState streamState=OmmState::OpenEnum, OmmState::DataState dataState=OmmState::OkEnum, UInt8 statusCode=0, const EmaString &statusText=EmaString())
 
RefreshMsgseqNum (UInt32 seqNum)
 
RefreshMsgpartNum (UInt16 partNum)
 
RefreshMsgitemGroup (const EmaBuffer &itemGroup)
 
RefreshMsgpermissionData (const EmaBuffer &permissionData)
 
RefreshMsgpublisherId (UInt32 userId, UInt32 userAddress)
 
RefreshMsgattrib (const ComplexType &data)
 
RefreshMsgpayload (const ComplexType &data)
 
RefreshMsgextendedHeader (const EmaBuffer &buffer)
 
RefreshMsgsolicited (bool solicited=false)
 
RefreshMsgdoNotCache (bool doNotCache=false)
 
RefreshMsgclearCache (bool clearCache=false)
 
RefreshMsgcomplete (bool complete=true)
 
RefreshMsgprivateStream (bool privateStream=false)
 
- Public Member Functions inherited from thomsonreuters::ema::access::Msg
bool hasMsgKey () const
 
bool hasName () const
 
bool hasNameType () const
 
bool hasServiceId () const
 
bool hasId () const
 
bool hasFilter () const
 
bool hasExtendedHeader () const
 
Int32 getStreamId () const
 
UInt16 getDomainType () const
 
const EmaStringgetName () const
 
UInt8 getNameType () const
 
UInt32 getServiceId () const
 
Int32 getId () const
 
UInt32 getFilter () const
 
const EmaBuffergetExtendedHeader () const
 
const AttribgetAttrib () const
 
const PayloadgetPayload () const
 
virtual ~Msg ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::ComplexType
virtual ~ComplexType ()
 
- Public Member Functions inherited from thomsonreuters::ema::access::Data
const EmaStringgetCodeAsString () const
 
 operator const char * () const
 
virtual ~Data ()
 

Friends

class DictionaryCallbackClient
 
class ItemCallbackClient
 

Additional Inherited Members

- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Msg
const Encoder & getEncoder () const
 
bool hasDecoder () const
 
bool hasEncoder () const
 
 Msg ()
 
void setDecoder (MsgDecoder *)
 
- Protected Member Functions inherited from thomsonreuters::ema::access::ComplexType
 ComplexType ()
 
- Protected Member Functions inherited from thomsonreuters::ema::access::Data
 Data ()
 
- Protected Attributes inherited from thomsonreuters::ema::access::Msg
Attrib _attrib
 
Payload _payload
 
MsgDecoder_pDecoder
 
MsgEncoder * _pEncoder
 

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 78 of file RefreshMsg.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::RefreshMsg::RefreshMsg ( )

Constructs RefreshMsg.

thomsonreuters::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.
virtual thomsonreuters::ema::access::RefreshMsg::~RefreshMsg ( )
virtual

Destructor.

Member Function Documentation

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

Specifies Attrib.

Parameters
[in]attriban object of ComplexType
Returns
reference to this object
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::extendedHeader ( const EmaBuffer buffer)

Specifies ExtendedHeader.

Parameters
[in]bufferan EmaBuffer containing extendedHeader information
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::filter ( UInt32  filter)

Specifies Filter.

Parameters
[in]filterspecifies Filter
Returns
reference to this object
const EmaBuffer& thomsonreuters::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 thomsonreuters::ema::access::Data.

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

Returns ClearCache.

Returns
true if cache needs to be cleared before applying this refresh; false otherwise
Data::DataCode thomsonreuters::ema::access::RefreshMsg::getCode ( ) const
virtual

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

Returns
Data::NoCodeEnum

Implements thomsonreuters::ema::access::Data.

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

Returns Complete.

Returns
true if this is the last part of the multi part refresh message
DataType::DataTypeEnum thomsonreuters::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 thomsonreuters::ema::access::Data.

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

Returns DoNotCache.

Returns
true if this refresh must not be cached; false otherwise
const EmaBuffer& thomsonreuters::ema::access::RefreshMsg::getItemGroup ( ) const

Returns ItemGroup.

Returns
EmaBuffer containing item group information
UInt16 thomsonreuters::ema::access::RefreshMsg::getPartNum ( ) const

Returns PartNum.

Exceptions
OmmInvalidUsageExceptionif hasPartNum() returns false
Returns
part number
const EmaBuffer& thomsonreuters::ema::access::RefreshMsg::getPermissionData ( ) const

Returns PermissionData.

Exceptions
OmmInvalidUsageExceptionif hasPermissionData() returns false
Returns
EmaBuffer containing permission data
bool thomsonreuters::ema::access::RefreshMsg::getPrivateStream ( ) const

Returns PrivateStream. true if this is private stream item

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

Returns PublisherIdUserAddress.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user address
UInt32 thomsonreuters::ema::access::RefreshMsg::getPublisherIdUserId ( ) const

Returns PublisherIdUserId.

Exceptions
OmmInvalidUsageExceptionif hasPublisherId() returns false
Returns
publisher's user Id
const OmmQos& thomsonreuters::ema::access::RefreshMsg::getQos ( ) const

Returns Qos.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos of item
UInt32 thomsonreuters::ema::access::RefreshMsg::getSeqNum ( ) const

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number
const EmaString& thomsonreuters::ema::access::RefreshMsg::getServiceName ( ) const

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
EmaString containing service name
bool thomsonreuters::ema::access::RefreshMsg::getSolicited ( ) const

Returns Solicited.

Returns
true if this is solicited refresh; false otherwise
const OmmState& thomsonreuters::ema::access::RefreshMsg::getState ( ) const

Returns State.

Returns
state of item (e.g. Open / Ok)
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::itemGroup ( const EmaBuffer itemGroup)

Specifies ItemGroup.

Parameters
[in]itemGroupan EmaBuffer object with item group information
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::name ( const EmaString name)

Specifies Name.

Parameters
[in]namean EmaString object containing item name
Returns
reference to this object
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::partNum ( UInt16  partNum)

Specifies PartNum.

Parameters
[in]partNumspecifies part number
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::payload ( const ComplexType data)

Specifies Payload.

Parameters
[in]payloadan object of ComplexType
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::permissionData ( const EmaBuffer permissionData)

Specifies PermissionData.

Parameters
[in]permissionDataan EmaBuffer object with permission data information
Returns
reference to this object
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::seqNum ( UInt32  seqNum)

Specifies SeqNum.

Parameters
[in]seqNumspecifies sequence number
Returns
reference to this object
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::serviceId ( UInt32  serviceId)

Specifies ServiceId.

Exceptions
OmmInvalidUsageExceptionif service name is already set
Parameters
[in]serviceIdservice identifier
Returns
reference to this object
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::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
RefreshMsg& thomsonreuters::ema::access::RefreshMsg::streamId ( Int32  streamId)

Specifies StreamId.

Parameters
[in]idstream id
Returns
reference to this object
const EmaString& thomsonreuters::ema::access::RefreshMsg::toString ( ) const
virtual

Returns a string representation of the class instance.

Returns
string representation of the class instance

Implements thomsonreuters::ema::access::Data.

Friends And Related Function Documentation

friend class DictionaryCallbackClient
friend

Definition at line 399 of file RefreshMsg.h.

friend class ItemCallbackClient
friend

Definition at line 398 of file RefreshMsg.h.