blpapi.test.MessageProperties#
- class blpapi.test.MessageProperties#
This class represents properties of a message that are not part of the message contents, such as the correlation ids or timestamp.
- __init__()#
Create ‘MessageProperties’ with default values.
Default value for the ‘CorrelationId’ property is an empty list. Default value for the ‘recapType’ property is ‘Message.RECAPTYPE_NONE’. Default value for the ‘fragmentType’ property is ‘Message.FRAGMENT_NONE’. Default value for the ‘Service’ and ‘timeReceived’ is “unset”.
- setCorrelationIds(cids)#
Set the correlationIds properties of the message.
- Parameters:
cids – list of correlation ids of the message.
- setRecapType(recapType, fragmentType=0)#
Set the recapType and fragmentType properties of the message.
- Parameters:
recapType (
int) – Recap type of the message. Seeblpapi.Messagefor valid values.fragmentType (
int) – Optional. Fragment type of the message. Seeblpapi.Messagefor valid values. The default value isblpapi.Message.FRAGMENT_NONE.
- Return type:
- setRequestId(requestId)#
Set the requestId property. A copy of this string is expected to be returned by
blpapi.Message.getRequestId(). If requestId is empty or None, the method throws.
- setService(service)#
Set the service property of the message.
- Parameters:
service (blpapi.Service) – Service of the message.
- setTimeReceived(timestamp)#
Set the timeReceived property of the message.
- Parameters:
timestamp (datetime.datetime) – Timestamp of the message.
- Return type: