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

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

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

Public Types

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

Public Member Functions

Constructor
 PostMsg ()
 
 PostMsg (const PostMsg &other)
 
Destructor
virtual ~PostMsg ()
 
Accessors
const EmaStringgetPostUserRightsAsString () const
 
DataType::DataTypeEnum getDataType () const
 
Data::DataCode getCode () const
 
const EmaBuffergetAsHex () const
 
const EmaStringtoString () const
 
bool hasSeqNum () const
 
bool hasPostId () const
 
bool hasPartNum () const
 
bool hasPostUserRights () const
 
bool hasPermissionData () const
 
bool hasServiceName () const
 
UInt32 getSeqNum () const
 
UInt32 getPostId () const
 
UInt16 getPartNum () const
 
UInt16 getPostUserRights () const
 
const EmaBuffergetPermissionData () const
 
UInt32 getPublisherIdUserId () const
 
UInt32 getPublisherIdUserAddress () const
 
bool getSolicitAck () const
 
bool getComplete () const
 
const EmaStringgetServiceName () const
 
Operations
PostMsgclear ()
 
PostMsgstreamId (Int32 streamId)
 
PostMsgdomainType (UInt16 domainType=rdm::MMT_MARKET_PRICE)
 
PostMsgname (const EmaString &name)
 
PostMsgnameType (UInt8 nameType=rdm::INSTRUMENT_NAME_RIC)
 
PostMsgserviceName (const EmaString &name)
 
PostMsgserviceId (UInt32 serviceId)
 
PostMsgid (Int32 id)
 
PostMsgfilter (UInt32 filter)
 
PostMsgseqNum (UInt32 seqNum)
 
PostMsgpostId (UInt32 postId)
 
PostMsgpartNum (UInt16 partNum)
 
PostMsgpostUserRights (UInt16 postUserRights)
 
PostMsgpermissionData (const EmaBuffer &permissionData)
 
PostMsgpublisherId (UInt32 UserId, UInt32 UserAddress)
 
PostMsgattrib (const ComplexType &data)
 
PostMsgpayload (const ComplexType &data)
 
PostMsgextendedHeader (const EmaBuffer &buffer)
 
PostMsgsolicitAck (bool ack=false)
 
PostMsgcomplete (bool complete=true)
 
- 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 ()
 

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

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 );
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 61 of file PostMsg.h.

Member Enumeration Documentation

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 68 of file PostMsg.h.

Constructor & Destructor Documentation

thomsonreuters::ema::access::PostMsg::PostMsg ( )

Constructs PostMsg.

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

Destructor.

Member Function Documentation

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

Specifies Attrib.

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

Specifies ExtendedHeader.

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

Specifies Filter.

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

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

Returns Complete.

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

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

Returns PartNum.

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

Returns PermissionData.

Exceptions
OmmInvalidUsageExceptionif hasPermissionData() returns false
Returns
EmaBuffer containing permission data
UInt32 thomsonreuters::ema::access::PostMsg::getPostId ( ) const

Returns the PostId.

Exceptions
OmmInvalidUsageExceptionif hasPostId() returns false
Returns
post id
UInt16 thomsonreuters::ema::access::PostMsg::getPostUserRights ( ) const

Returns PostUserRights.

Exceptions
OmmInvalidUsageExceptionif hasPostUserRights() returns false
Returns
PostUserRights
const EmaString& thomsonreuters::ema::access::PostMsg::getPostUserRightsAsString ( ) const

Returns the PostUserRights value as a string format.

Returns
string representation of PostUserRights
UInt32 thomsonreuters::ema::access::PostMsg::getPublisherIdUserAddress ( ) const

Returns PublisherIdUserAddress.

Returns
publisher's user address
UInt32 thomsonreuters::ema::access::PostMsg::getPublisherIdUserId ( ) const

Returns PublisherIdUserId.

Returns
publisher's user Id
UInt32 thomsonreuters::ema::access::PostMsg::getSeqNum ( ) const

Returns SeqNum.

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

Returns the ServiceName within the MsgKey.

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

Indicates that acknowledgement is requested.

Returns
true if acknowledgement is requested; false otherwise
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
bool thomsonreuters::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
PostMsg& thomsonreuters::ema::access::PostMsg::id ( Int32  id)

Specifies Id.

Parameters
[in]idspecifies Id
Returns
reference to this object
PostMsg& thomsonreuters::ema::access::PostMsg::name ( const EmaString name)

Specifies Name.

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

Specifies PartNum.

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

Specifies Payload.

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

Specifies PermissionData.

Parameters
[in]permissionDataan EmaBuffer object with permission data information
Returns
reference to this object
PostMsg& thomsonreuters::ema::access::PostMsg::postId ( UInt32  postId)

Specifies PostId.

Parameters
[in]postIdspecifies post id
Returns
reference to this object
PostMsg& thomsonreuters::ema::access::PostMsg::postUserRights ( UInt16  postUserRights)

Specifies PostUserRights.

Parameters
[in]postUserRightsspecifies post user rights
Returns
reference to this object
PostMsg& thomsonreuters::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
PostMsg& thomsonreuters::ema::access::PostMsg::seqNum ( UInt32  seqNum)

Specifies SeqNum.

Parameters
[in]seqNumspecifies sequence number
Returns
reference to this object
PostMsg& thomsonreuters::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
PostMsg& thomsonreuters::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
PostMsg& thomsonreuters::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
PostMsg& thomsonreuters::ema::access::PostMsg::streamId ( Int32  streamId)

Specifies StreamId.

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

Returns a string representation of the class instance.

Returns
string representation of the class instance

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