BLPAPI C++  3.24.11
MessageProperties Class Reference

#include <blpapi_testutil.h>

Public Member Functions

 MessageProperties ()
 
 MessageProperties (const MessageProperties &original)
 
 ~MessageProperties ()
 
MessagePropertiesoperator= (const MessageProperties &rhs)
 
MessagePropertiessetCorrelationIds (const blpapi_CorrelationId_t *correlationIds, size_t correlationIdCount)
 
MessagePropertiessetCorrelationIds (const std::vector< CorrelationId > &correlationIds)
 
MessagePropertiessetCorrelationId (const CorrelationId &correlationId)
 
MessagePropertiessetRecapType (Message::RecapType::Type recapType, Message::Fragment fragmentType=Message::FRAGMENT_NONE)
 
MessagePropertiessetTimeReceived (const Datetime &timeReceived)
 
MessagePropertiessetService (const Service &service)
 
MessagePropertiessetRequestId (const char *requestId)
 
blpapi_MessageProperties_thandle () const
 

Detailed Description

This class represents properties of a message that are not part of the message contents, for example the correlation ids, or timestamp.

See Component blpapi_testutil

Constructor & Destructor Documentation

◆ MessageProperties() [1/2]

Creates a MessageProperties with default values. Default value for CorrelationId property is an empty vector. Default value for RecapType property is Message::RecapType::e_none. Default value for FragmentType property is Message::FRAGMENT_NONE. Value for Service and timestamp is "unset".

◆ MessageProperties() [2/2]

MessageProperties ( const MessageProperties original)

Creates a MessageProperties from original.

◆ ~MessageProperties()

Destroys this MessageProperties.

Member Function Documentation

◆ handle()

blpapi_MessageProperties_t * handle ( ) const

Return the handle of the current MessageProperties. For internal use only.

◆ operator=()

MessageProperties & operator= ( const MessageProperties rhs)

Make this MessageProperties same as rhs.

◆ setCorrelationId()

MessageProperties & setCorrelationId ( const CorrelationId correlationId)

Equivalent to setCorrelationIds(&correlationId, 1).

◆ setCorrelationIds() [1/2]

MessageProperties & setCorrelationIds ( const blpapi_CorrelationId_t *  correlationIds,
size_t  correlationIdCount 
)

Sets the CorrelationId property. correlationIdCount provides the number of correlationIds to be added. The behavior is undefined unless correlationIds points to an array of at least correlationIdCount elements. The default value of CorrelationId property is an empty vector.

◆ setCorrelationIds() [2/2]

MessageProperties & setCorrelationIds ( const std::vector< CorrelationId > &  correlationIds)

Sets the CorrelationId property. correlationIds provides the CorrelationId to be added.

◆ setRecapType()

MessageProperties & setRecapType ( Message::RecapType::Type  recapType,
Message::Fragment  fragmentType = Message::FRAGMENT_NONE 
)

Sets the RecapType and FragmentType properties.

◆ setRequestId()

MessageProperties & setRequestId ( const char *  requestId)

Sets the request id property. A copy of this string is expected to be returned by Message::getRequestId(). If requestId is empty or null, the method throws.

◆ setService()

MessageProperties & setService ( const Service service)

Sets the service property.

◆ setTimeReceived()

MessageProperties & setTimeReceived ( const Datetime timeReceived)

Sets the time received property. The default timestamp is "unset", so attempting to retrieve the timestamp of a message with default properties will throw an exception.


The documentation for this class was generated from the following file: