Class Index | File Index

Classes


Class Paho.MQTT.Message


Defined in: mqttws31.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
An application message, sent or received.
Field Summary
Field Attributes Field Name and Description
 
mandatory The name of the destination to which the message is to be sent (for messages about to be sent) or the name of the destination from which the message has been received.
 
read only If true, this message might be a duplicate of one which has already been received.
 
read only The payload as an ArrayBuffer.
 
read only The payload as a string if the payload consists of valid UTF-8 characters.
 
qos
The Quality of Service used to deliver the message.
 
If true, the message is to be retained by the server and delivered to both current and future subscriptions.
Class Detail
Paho.MQTT.Message(payload)
An application message, sent or received.

All attributes may be null, which implies the default values.

Parameters:
{String|ArrayBuffer} payload
The message data to be sent.

Field Detail
{string} destinationName
mandatory The name of the destination to which the message is to be sent (for messages about to be sent) or the name of the destination from which the message has been received. (for messages received by the onMessage function).


{Boolean} duplicate
read only If true, this message might be a duplicate of one which has already been received. This is only set on messages received from the server.

{ArrayBuffer} payloadBytes
read only The payload as an ArrayBuffer.


{string} payloadString
read only The payload as a string if the payload consists of valid UTF-8 characters.

{number} qos
The Quality of Service used to deliver the message.
0 Best effort (default).
1 At least once.
2 Exactly once.


{Boolean} retained
If true, the message is to be retained by the server and delivered to both current and future subscriptions. If false the server only delivers the message to current subscribers, this is the default for new Messages. A received message has the retained boolean set to true if the message was published with the retained boolean set to true and the subscrption was made after the message has been published.


Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 21 2014 11:26:45 GMT+0100 (BST)