Package com.bloomberglp.blpapi.test
Class MessageProperties
java.lang.Object
com.bloomberglp.blpapi.test.MessageProperties
This class represents properties of a message that are not part of the message contents, for
example the
CorrelationID, or timestamp.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetCorrelationId(CorrelationID correlationId) Equivalent tosetCorrelationIds(java.util.List<com.bloomberglp.blpapi.CorrelationID>)with oneCorrelationID.setCorrelationIds(List<CorrelationID> correlationIds) Sets theCorrelationIDproperty.setRecapType(Message.Recap recapType, Message.Fragment fragmentType) Sets theMessage.RecapandMessage.Fragmentproperties.setRequestId(String requestId) Sets therequestIdproperty.setService(Service service) Sets theserviceproperty.setTimeReceived(Datetime timeReceived) Sets the time received property.
-
Constructor Details
-
MessageProperties
public MessageProperties()Creates aMessagePropertieswith default values. Default value forCorrelationIDproperty is an empty list. Default value forMessage.Recapproperty isMessage.Recap.NONE. Default value forMessage.Fragmentproperty isMessage.Fragment.NONE. Default Value forService,timeReceivedorrequestIdisnull.
-
-
Method Details
-
setCorrelationIds
public MessageProperties setCorrelationIds(List<CorrelationID> correlationIds) throws IllegalArgumentException Sets theCorrelationIDproperty.- Parameters:
correlationIds- theCorrelationIDs to be added.- Returns:
- this
- Throws:
IllegalArgumentException
-
setCorrelationId
public MessageProperties setCorrelationId(CorrelationID correlationId) throws IllegalArgumentException Equivalent tosetCorrelationIds(java.util.List<com.bloomberglp.blpapi.CorrelationID>)with oneCorrelationID.- Parameters:
correlationId-- Returns:
- this
- Throws:
IllegalArgumentException
-
setRecapType
public MessageProperties setRecapType(Message.Recap recapType, Message.Fragment fragmentType) throws IllegalArgumentException Sets theMessage.RecapandMessage.Fragmentproperties.- Parameters:
recapType-fragmentType-- Returns:
- this
- Throws:
IllegalArgumentException
-
setTimeReceived
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.- Parameters:
timeReceived- represents the timestamp of the received message.- Returns:
- this
- Throws:
IllegalArgumentException
-
setService
Sets theserviceproperty.- Parameters:
service-- Returns:
- this
- Throws:
IllegalArgumentException
-
setRequestId
Sets therequestIdproperty.- Parameters:
requestId-- Returns:
- this
- Throws:
IllegalArgumentException
-