-
- All Implemented Interfaces:
-
org.eclipse.paho.client.mqttv3.MqttPersistable
public class MqttPersistentData implements MqttPersistable
-
-
Constructor Summary
Constructors Constructor Description MqttPersistentData(String key, Array<byte> header, int hOffset, int hLength, Array<byte> payload, int pOffset, int pLength)Construct a data object to pass across the MQTT client persistence interface.
-
Method Summary
Modifier and Type Method Description StringgetKey()Array<byte>getHeaderBytes()Returns the header bytes in an array. intgetHeaderLength()Returns the length of the header. intgetHeaderOffset()Returns the offset of the header within the byte array returned by getHeaderBytes. Array<byte>getPayloadBytes()Returns the payload bytes in an array. intgetPayloadLength()Returns the length of the payload. intgetPayloadOffset()Returns the offset of the payload within the byte array returned by getPayloadBytes. -
-
Constructor Detail
-
MqttPersistentData
MqttPersistentData(String key, Array<byte> header, int hOffset, int hLength, Array<byte> payload, int pOffset, int pLength)
Construct a data object to pass across the MQTT client persistence interface.- Parameters:
key- The key which identifies this dataheader- The message headerhOffset- The start offset of the header bytes in header.hLength- The length of the header in the header bytes array.payload- The message payloadpOffset- The start offset of the payload bytes in payload.pLength- The length of the payload in the payload bytes array when persisting the message.
-
-
Method Detail
-
getHeaderBytes
Array<byte> getHeaderBytes()
Returns the header bytes in an array. The bytes start at getHeaderOffset and continue for getHeaderLength.
-
getHeaderLength
int getHeaderLength()
Returns the length of the header.
-
getHeaderOffset
int getHeaderOffset()
Returns the offset of the header within the byte array returned by getHeaderBytes.
-
getPayloadBytes
Array<byte> getPayloadBytes()
Returns the payload bytes in an array. The bytes start at getPayloadOffset and continue for getPayloadLength.
-
getPayloadLength
int getPayloadLength()
Returns the length of the payload.
-
getPayloadOffset
int getPayloadOffset()
Returns the offset of the payload within the byte array returned by getPayloadBytes.
-
-
-
-