Mqtt Class
- java.
lang. Object - MqttCallback
- com.
microsoft. azure. sdk. iot. device. transport. mqtt. Mqtt
- com.
public class Mqtt
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
connectionLost(Throwable throwable)
Event fired when the connection with the MQTT broker is lost. |
void |
deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken)
Event fired when the message arrived on the MQTT broker. |
void |
messageArrived(String topic, MqttMessage mqttMessage)
Event fired when the message arrived on the MQTT broker. |
Iot |
receive()
Method to receive messages on mqtt broker connection. |
Method Details
connectionLost
public void connectionLost(Throwable throwable)
Event fired when the connection with the MQTT broker is lost.
Parameters:
deliveryComplete
public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken)
Event fired when the message arrived on the MQTT broker.
Parameters:
messageArrived
public void messageArrived(String topic, MqttMessage mqttMessage)
Event fired when the message arrived on the MQTT broker.
Parameters:
receive
public IotHubTransportMessage receive()
Method to receive messages on mqtt broker connection.
Returns:
a received message. It can benull
</code></p>
Applies to
Azure SDK for Java