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
-
Method Summary
Modifier and TypeMethodDescriptionsetCorrelationId
(CorrelationID correlationId) Equivalent tosetCorrelationIds(java.util.List<com.bloomberglp.blpapi.CorrelationID>)
with oneCorrelationID
.setCorrelationIds
(List<CorrelationID> correlationIds) Sets theCorrelationID
property.setRecapType
(Message.Recap recapType, Message.Fragment fragmentType) Sets theMessage.Recap
andMessage.Fragment
properties.setRequestId
(String requestId) Sets therequestId
property.setService
(Service service) Sets theservice
property.setTimeReceived
(Datetime timeReceived) Sets the time received property.
-
Constructor Details
-
MessageProperties
public MessageProperties()Creates aMessageProperties
with default values. Default value forCorrelationID
property is an empty list. Default value forMessage.Recap
property isMessage.Recap.NONE
. Default value forMessage.Fragment
property isMessage.Fragment.NONE
. Default Value forService
,timeReceived
orrequestId
isnull
.
-
-
Method Details
-
setCorrelationIds
public MessageProperties setCorrelationIds(List<CorrelationID> correlationIds) throws IllegalArgumentException Sets theCorrelationID
property.- Parameters:
correlationIds
- theCorrelationID
s 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.Recap
andMessage.Fragment
properties.- 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 theservice
property.- Parameters:
service
-- Returns:
- this
- Throws:
IllegalArgumentException
-
setRequestId
Sets therequestId
property.- Parameters:
requestId
-- Returns:
- this
- Throws:
IllegalArgumentException
-