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

PostMsg allows consumer applications to contribute content. More...

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

Public Types

enum  PostUserRights {
  CreateEnum = 0x01 ,
  DeleteEnum = 0x02 ,
  ModifyPermissionEnum = 0x04
}
 
- Public Types inherited from refinitiv::ema::access::Data
enum  DataCode {
  NoCodeEnum = 0 ,
  BlankEnum = 1
}
 

Public Member Functions

Constructor
 PostMsg ()
  More...
 
 PostMsg (const PostMsg &other)
  More...
 
Destructor
virtual ~PostMsg ()
  More...
 
Accessors
const EmaStringgetPostUserRightsAsString () 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 hasPostId () const
  More...
 
bool hasPartNum () const
  More...
 
bool hasPostUserRights () const
  More...
 
bool hasPermissionData () const
  More...
 
bool hasServiceName () const
  More...
 
UInt32 getSeqNum () const
  More...
 
UInt32 getPostId () const
  More...
 
UInt16 getPartNum () const
  More...
 
UInt16 getPostUserRights () const
  More...
 
const EmaBuffergetPermissionData () const
  More...
 
UInt32 getPublisherIdUserId () const
  More...
 
UInt32 getPublisherIdUserAddress () const
  More...
 
bool getSolicitAck () const
  More...
 
bool getComplete () 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

PostMsgclear ()
  More...
 
PostMsgstreamId (Int32 streamId)
  More...
 
PostMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
  More...
 
PostMsgname (const EmaString &name)
  More...
 
PostMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
  More...
 
PostMsgserviceName (const EmaString &name)
  More...
 
PostMsgserviceId (UInt32 serviceId)
  More...
 
PostMsgid (Int32 id)
  More...
 
PostMsgfilter (UInt32 filter)
  More...
 
PostMsgseqNum (UInt32 seqNum)
  More...
 
PostMsgpostId (UInt32 postId)
  More...
 
PostMsgpartNum (UInt16 partNum)
  More...
 
PostMsgpostUserRights (UInt16 postUserRights)
  More...
 
PostMsgpermissionData (const EmaBuffer &permissionData)
  More...
 
PostMsgpublisherId (UInt32 UserId, UInt32 UserAddress)
  More...
 
PostMsgattrib (const ComplexType &data)
  More...
 
PostMsgpayload (const ComplexType &data)
  More...
 
PostMsgextendedHeader (const EmaBuffer &buffer)
  More...
 
PostMsgsolicitAck (bool ack=false)
  More...
 
PostMsgcomplete (bool complete=true)
  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

PostMsg may be submitted on any market item stream or login stream. Submission on a market item stream is referred to as the "on stream posting" while submission on a login stream is considered as the "off stream posting". On stream posting content is related to the item on whose stream the posting happens, while the off stream posting may contain info about any item.

PostMsg may be submitted using OmmConsumer::submit( const PostMsg& , UInt64 ).

The following code snippet shows setting and submission of an on stream PostMsg.

PostMsg postMsg;
FieldList fieldList;
fieldList.addInt( 12, 123 ).addAscii( 255, "my ascii" ).complete();
postMsg.payload( fieldList );
consumer.submit( postMsg, itemHandle );
friend class FieldList
Definition: Data.h:133
Remarks
Calling get***() method on an optional member of PostMsg 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 PostMsg.
Objects of this class are not cache-able.
Decoding of just encoded PostMsg 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 62 of file PostMsg.h.

Member Enumeration Documentation

◆ PostUserRights

An enumeration representing post user rights.

Enumerator
CreateEnum 

Specifies ability to create records.

DeleteEnum 

Specifies ability to delete records.

ModifyPermissionEnum 

Specifies ability to modify permissions.

Definition at line 69 of file PostMsg.h.

Constructor & Destructor Documentation

◆ PostMsg() [1/2]

refinitiv::ema::access::PostMsg::PostMsg ( )

Constructs PostMsg.

◆ PostMsg() [2/2]

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

Copy constructor.

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

◆ ~PostMsg()

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

Destructor.

Member Function Documentation

◆ attrib()

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

Specifies Attrib.

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

◆ clear()

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

Clears the PostMsg.

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

◆ complete()

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

Specifies Complete.

Remarks
must be set to true for one part post message
Parameters
[in]completespecifies if this is the last part of the multi part post message
Returns
reference to this object

◆ domainType()

PostMsg& refinitiv::ema::access::PostMsg::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()

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

Specifies ExtendedHeader.

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

◆ filter()

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

Specifies Filter.

Parameters
[in]filterspecifies filter
Returns
reference to this object

◆ getAsHex()

const EmaBuffer& refinitiv::ema::access::PostMsg::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.

◆ getCode()

Data::DataCode refinitiv::ema::access::PostMsg::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::PostMsg::getComplete ( ) const

Returns Complete.

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

◆ getDataType()

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

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

Returns
DataType::PostMsgEnum

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

◆ getPartNum()

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

Returns PartNum.

Exceptions
OmmInvalidUsageExceptionif hasPartNum() returns false
Returns
part number

◆ getPermissionData()

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

Returns PermissionData.

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

◆ getPostId()

UInt32 refinitiv::ema::access::PostMsg::getPostId ( ) const

Returns the PostId.

Exceptions
OmmInvalidUsageExceptionif hasPostId() returns false
Returns
post id

◆ getPostUserRights()

UInt16 refinitiv::ema::access::PostMsg::getPostUserRights ( ) const

Returns PostUserRights.

Exceptions
OmmInvalidUsageExceptionif hasPostUserRights() returns false
Returns
PostUserRights

◆ getPostUserRightsAsString()

const EmaString& refinitiv::ema::access::PostMsg::getPostUserRightsAsString ( ) const

Returns the PostUserRights value as a string format.

Returns
string representation of PostUserRights

◆ getPublisherIdUserAddress()

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

Returns PublisherIdUserAddress.

Returns
publisher's user address

◆ getPublisherIdUserId()

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

Returns PublisherIdUserId.

Returns
publisher's user Id

◆ getSeqNum()

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

Returns SeqNum.

Exceptions
OmmInvalidUsageExceptionif hasSeqNum() returns false
Returns
sequence number

◆ getServiceName()

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

Returns the ServiceName within the MsgKey.

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

◆ getSolicitAck()

bool refinitiv::ema::access::PostMsg::getSolicitAck ( ) const

Indicates that acknowledgement is requested.

Returns
true if acknowledgement is requested; false otherwise

◆ hasPartNum()

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

Indicates presence of PartNum.

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

◆ hasPermissionData()

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

Indicates presence of PermissionData.

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

◆ hasPostId()

bool refinitiv::ema::access::PostMsg::hasPostId ( ) const

Indicates presence of the PostId.

Remarks
post id is an optional member of PostMsg
Returns
true if PostId is set; false otherwise

◆ hasPostUserRights()

bool refinitiv::ema::access::PostMsg::hasPostUserRights ( ) const

Indicates presence of PostUserRights.

Remarks
post user rights is an optional member of PostMsg
Returns
true if PostUserRights are set; false otherwise

◆ hasSeqNum()

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

Indicates presence of SeqNum.

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

◆ hasServiceName()

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

Indicates presence of the ServiceName within the MsgKey.

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

◆ id()

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

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object

◆ name()

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

Specifies Name.

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

◆ nameType()

PostMsg& refinitiv::ema::access::PostMsg::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()

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

Specifies PartNum.

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

◆ payload()

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

Specifies Payload.

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

◆ permissionData()

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

Specifies PermissionData.

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

◆ postId()

PostMsg& refinitiv::ema::access::PostMsg::postId ( UInt32  postId)

Specifies PostId.

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

◆ postUserRights()

PostMsg& refinitiv::ema::access::PostMsg::postUserRights ( UInt16  postUserRights)

Specifies PostUserRights.

Parameters
[in]postUserRightsspecifies post user rights
Returns
reference to this object

◆ publisherId()

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

◆ seqNum()

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

Specifies SeqNum.

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

◆ serviceId()

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

Specifies ServiceId.

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

◆ serviceName()

PostMsg& refinitiv::ema::access::PostMsg::serviceName ( const EmaString name)

Specifies ServiceName.

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

◆ solicitAck()

PostMsg& refinitiv::ema::access::PostMsg::solicitAck ( bool  ack = false)

Specifies acknowledgement.

Parameters
[in]ackspecifies if an acknowledgement is requested (default value is false)
Returns
reference to this object

◆ streamId()

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

Specifies StreamId.

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

◆ toString() [1/2]

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