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

ReqMsg allows consumer application to express its interest in an item. More...

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

Public Types

enum  Rate {
  TickByTickEnum = 0,
  JustInTimeConflatedEnum = 0xFFFFFF00,
  BestConflatedRateEnum = 0xFFFFFFFF,
  BestRateEnum = 0xFFFFFFFE
}
 
enum  Timeliness {
  RealTimeEnum = 0,
  BestDelayedTimelinessEnum = 0xFFFFFFFF,
  BestTimelinessEnum = 0xFFFFFFFE
}
 
- Public Types inherited from thomsonreuters::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0,
  BlankEnum = 1
}
 

Public Member Functions

Constructor
 ReqMsg ()
 
 ReqMsg (const ReqMsg &other)
 
Destructor
virtual ~ReqMsg ()
 
Accessors
const EmaStringgetRateAsString () const
 
const EmaStringgetTimelinessAsString () const
 
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
bool hasPriority () const
 
bool hasQos () const
 
bool hasView () const
 
bool hasBatch () const
 
bool hasServiceName () const
 
UInt8 getPriorityClass () const
 
UInt16 getPriorityCount () const
 
UInt32 getQosTimeliness () const
 
UInt32 getQosRate () const
 
bool getInitialImage () const
 
bool getInterestAfterRefresh () const
 
bool getConflatedInUpdates () const
 
bool getPause () const
 
bool getPrivateStream () const
 
const EmaStringgetServiceName () const
 
Operations
ReqMsgclear ()
 
ReqMsgstreamId (Int32 streamId)
 
ReqMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
 
ReqMsgname (const EmaString &name)
 
ReqMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
 
ReqMsgserviceName (const EmaString &serviceName)
 
ReqMsgserviceId (UInt32 serviceId)
 
ReqMsgid (Int32 id)
 
ReqMsgfilter (UInt32 filter)
 
ReqMsgpriority (UInt8 priorityClass=1, UInt16 priorityCount=1)
 
ReqMsgqos (UInt32 timeliness=BestTimelinessEnum, UInt32 rate=BestRateEnum)
 
ReqMsgattrib (const ComplexType &data)
 
ReqMsgpayload (const ComplexType &data)
 
ReqMsgextendedHeader (const EmaBuffer &Buffer)
 
ReqMsginitialImage (bool initialImage=true)
 
ReqMsginterestAfterRefresh (bool interestAfterRefresh=true)
 
ReqMsgpause (bool pause=false)
 
ReqMsgconflatedInUpdates (bool conflatedInUpdates=false)
 
ReqMsgprivateStream (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 DictionaryHandler
 
class DirectoryHandler
 
class MarketItemHandler
 

Additional Inherited Members

- 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

Among other attributes, ReqMsg conveys item's name, service, domain type, and desired quality of service. ReqMsg may also be used to: specify application interest in a dynamic view, open a batch of items, or request a symbol list item with its data.

The following code snippet shows specification of ReqMsg and registration of interest in this item.

class AppClient : public OmmConsumerClient { ... }
AppClient client;
OmmConsumer consumer( OmmConsumerConfig().host( "1.1.1.1:14002" ) );
ReqMsg reqMsg;
reqMsg.name( "IBM.N" ).serviceName( "DIRECT_FEED" ).priority( 2, 1 );
UInt64 itemHandle = consumer.registerClient( reqMsg, appClient );
Remarks
Calling get***() method on an optional member of ReqMsg 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 ReqMsg.
Objects of this class are not cache-able.
Decoding of just encoded ReqMsg 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 58 of file ReqMsg.h.

Member Enumeration Documentation

An enumeration representing Qos Rate.

Enumerator
TickByTickEnum 

Rate is Tick By Tick, indicates every change to information is conveyed

JustInTimeConflatedEnum 

Rate is Just In Time Conflated, indicates extreme bursts of data may be conflated

BestConflatedRateEnum 

Request Rate with range from 1 millisecond conflation to maximum conflation.

BestRateEnum 

Request Rate with range from tick-by-tick to maximum conflation.

Definition at line 65 of file ReqMsg.h.

An enumeration representing Qos Timeliness.

Enumerator
RealTimeEnum 

Timeliness is RealTime, indicates information is updated as soon as new information becomes available

BestDelayedTimelinessEnum 

Request Timeliness with range from one second delay to maximum delay.

BestTimelinessEnum 

Request Timeliness with range from real-time to maximum delay.

Definition at line 81 of file ReqMsg.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::ReqMsg::ReqMsg ( )

Constructs ReqMsg.

thomsonreuters::ema::access::ReqMsg::ReqMsg ( const ReqMsg other)

Copy constructor.

Remarks
this is used to copy and process ReqMsg outside of EMA's callback methods.
this method does not support passing in just encoded ReqMsg in the application space.
virtual thomsonreuters::ema::access::ReqMsg::~ReqMsg ( )
virtual

Destructor.

Member Function Documentation

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

Specifies Attrib.

Parameters
[in]attriban object of ComplexType
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::clear ( )

Clears the ReqMsg.

Remarks
Invoking clear() method clears all the values and resets all the defaults
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::conflatedInUpdates ( bool  conflatedInUpdates = false)

Specifies ConflatedInUpdates.

Parameters
[in]conflatedInUpdatesspecifies if conflated update is requested (default value is false)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::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
ReqMsg& thomsonreuters::ema::access::ReqMsg::extendedHeader ( const EmaBuffer Buffer)

Specifies ExtendedHeader.

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

Specifies Filter.

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

Data::DataCode thomsonreuters::ema::access::ReqMsg::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::ReqMsg::getConflatedInUpdates ( ) const

Returns ConflatedInUpdates.

Returns
true if conflation is requested; false otherwise
DataType::DataTypeEnum thomsonreuters::ema::access::ReqMsg::getDataType ( ) const
virtual

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

Returns
DataType::ReqMsgEnum

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

bool thomsonreuters::ema::access::ReqMsg::getInitialImage ( ) const

Returns InitialImage.

Returns
true if an initial image is requested; false otherwise
bool thomsonreuters::ema::access::ReqMsg::getInterestAfterRefresh ( ) const

Returns InterestAfterRefresh.

Returns
true if an interest after refresh is requested; false otherwise
bool thomsonreuters::ema::access::ReqMsg::getPause ( ) const

Returns Pause.

Returns
true if pause is requested; false otherwise
UInt8 thomsonreuters::ema::access::ReqMsg::getPriorityClass ( ) const

Returns PriorityClass.

Exceptions
OmmInvalidUsageExceptionif hasPriority() returns false
Returns
priority class
UInt16 thomsonreuters::ema::access::ReqMsg::getPriorityCount ( ) const

Returns PriorityCount.

Exceptions
OmmInvalidUsageExceptionif hasPriority() returns false
Returns
priority count
bool thomsonreuters::ema::access::ReqMsg::getPrivateStream ( ) const

Returns PrivateStream.

Returns
true if private stream is requested; false otherwise
UInt32 thomsonreuters::ema::access::ReqMsg::getQosRate ( ) const

Returns QosRate.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos Rate
UInt32 thomsonreuters::ema::access::ReqMsg::getQosTimeliness ( ) const

Returns QosTimeliness.

Exceptions
OmmInvalidUsageExceptionif hasQos() returns false
Returns
Qos Timeliness
const EmaString& thomsonreuters::ema::access::ReqMsg::getRateAsString ( ) const

Returns the Rate value as a string format.

Returns
string representation of Qos Rate
const EmaString& thomsonreuters::ema::access::ReqMsg::getServiceName ( ) const

Returns the ServiceName within the MsgKey.

Exceptions
OmmInvalidUsageExceptionif hasServiceName() returns false
Returns
service name
const EmaString& thomsonreuters::ema::access::ReqMsg::getTimelinessAsString ( ) const

Returns the Timeliness value as a string format.

Returns
string representation of Qos Timeliness
bool thomsonreuters::ema::access::ReqMsg::hasBatch ( ) const

Indicates presence of Batch.

Remarks
Batch specification is an optional member of ReqMsg
Returns
true if Batch specification is set; false otherwise
bool thomsonreuters::ema::access::ReqMsg::hasPriority ( ) const

Indicates presence of Priority.

Remarks
Priority is an optional member of ReqMsg
Returns
true if priority is set; false otherwise
bool thomsonreuters::ema::access::ReqMsg::hasQos ( ) const

Indicates presence of Qos.

Remarks
Qos is an optional member of ReqMsg
Returns
true if Qos is set; false otherwise
bool thomsonreuters::ema::access::ReqMsg::hasServiceName ( ) const

Indicates presence of the ServiceName within the MsgKey.

Remarks
ServiceName is an optional member of ReqMsg.
Returns
true if service name is set; false otherwise
bool thomsonreuters::ema::access::ReqMsg::hasView ( ) const

Indicates presence of View.

Remarks
View specification is an optional member of ReqMsg
Returns
true if View is set; false otherwise
ReqMsg& thomsonreuters::ema::access::ReqMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::initialImage ( bool  initialImage = true)

Specifies InitialImage.

Parameters
[in]initialImagespecifies if initial image / refresh is requested (default value is true)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::interestAfterRefresh ( bool  interestAfterRefresh = true)

Specifies InterestAfterRefresh.

Parameters
[in]interestAfterRefreshspecifies if streaming or snapshot item is requested default value is true / streaming item)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::name ( const EmaString name)

Specifies Name.

Parameters
[in]namespecifies item name
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::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
ReqMsg& thomsonreuters::ema::access::ReqMsg::pause ( bool  pause = false)

Specifies Pause.

Parameters
[in]pausespecifies if pause is requested (default value is false)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::payload ( const ComplexType data)

Specifies Payload.

Parameters
[in]payloadan object of ComplexType
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::priority ( UInt8  priorityClass = 1,
UInt16  priorityCount = 1 
)

Specifies Priority.

Parameters
[in]priorityClassspecifies priority class
[in]priorityCountspecifies priority count within priority class
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::privateStream ( bool  privateStream = false)

Specifies PrivateStream.

Parameters
[in]privateStreamspecifies if private stream is requested (default value is false)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::qos ( UInt32  timeliness = BestTimelinessEnum,
UInt32  rate = BestRateEnum 
)

Specifies Qos as timeliness and rate.

Parameters
[in]timelinessspecifies Qos Timeliness (default value is BestTimelinessEnum)
[in]ratespecifies Qos rate (default value is BestRateEnum)
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::serviceId ( UInt32  serviceId)

Specifies ServiceId.

Remarks
One service identification must be set, either id or name.
Exceptions
OmmInvalidUsageExceptionif service name is already set
Parameters
[in]serviceIdspecifies service id
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::serviceName ( const EmaString serviceName)

Specifies ServiceName.

Remarks
One service identification must be set, either id or name.
Exceptions
OmmInvalidUsageExceptionif service id is already set
Parameters
[in]serviceNamespecifies service name
Returns
reference to this object
ReqMsg& thomsonreuters::ema::access::ReqMsg::streamId ( Int32  streamId)

Specifies StreamId.

Parameters
[in]streamIdspecifies stream id
Returns
reference to this object
const EmaString& thomsonreuters::ema::access::ReqMsg::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 DictionaryHandler
friend

Definition at line 357 of file ReqMsg.h.

friend class DirectoryHandler
friend

Definition at line 356 of file ReqMsg.h.

friend class MarketItemHandler
friend

Definition at line 355 of file ReqMsg.h.