Message 类

定义

IotHub specific message container

public class Message
继承
java.lang.Object
Message

构造函数

Message()

Basic constructor

Message(byte[] byteArray)

byteArray: a byte array containing the body of the message

Message(ByteArrayInputStream stream)

stream: a stream containing the body of the message

Message(String string)

字段

correlationId

Used in message responses and feedback

方法

clearCustomProperties()
getBodyStream()

The stream content of the body.

getBytes()

The byte content of the body.

getCorrelationId()
getDeliveryAcknowledgement()
getExpiryTimeUtc()
getLockToken()
getMessageId()
getProperties()
getTo()
getUserId()
setCorrelationId(String correlationId)
setDeliveryAcknowledgement(DeliveryAcknowledgement deliveryAcknowledgement)

<xreftitle>Deprecated</xreftitle>

<xrefdescription>

  <p>as of service-client version 1.15.1, please use <xref uid="com.microsoft.azure.sdk.iot.service.Message.setDeliveryAcknowledgementFinal(DeliveryAcknowledgement)" data-throw-if-not-resolved="false" data-raw-source="setDeliveryAcknowledgementFinal(DeliveryAcknowledgement)"></xref></p>

</xrefdescription>

setDeliveryAcknowledgementFinal(DeliveryAcknowledgement deliveryAcknowledgement)
setExpiryTimeUtc(Date expiryTimeUtc)
setMessageId(String messageId)
setProperties(Map<String, String> properties)
setTo(String deviceId)
setUserId(String userId)

适用于