| Modifier and Type | Method and Description |
|---|---|
MessageInterface<T> |
decode(org.eclipse.paho.client.mqttv3.MqttMessage msg)
Convert an MQTT message into an instance of com.ibm.wiotp.sdk.Message
|
byte[] |
encode(T data,
org.joda.time.DateTime timestamp)
Convert an Object into a byte array suitable to send via MQTT
|
Class<T> |
getMessageClass() |
String |
getMessageFormat() |
byte[] encode(T data, org.joda.time.DateTime timestamp)
data - the Object to be encodedtimestamp - the time that the message was generatedMessageInterface<T> decode(org.eclipse.paho.client.mqttv3.MqttMessage msg) throws MalformedMessageException
msg - the MqttMessage from Paho MQTT client to decodeMalformedMessageException - If unable to decode the messageString getMessageFormat()
Copyright © 2019. All rights reserved.