public class Mqtt
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Mqtt(java.lang.String accountId,
java.lang.String apiKey,
java.lang.String clientId,
org.eclipse.paho.client.mqttv3.IMqttAsyncClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect() |
void |
onMessage(MqttMessageHandler handler) |
void |
publish(java.lang.String topic,
byte[] payload) |
void |
subscribe(java.lang.String topic) |
protected Mqtt(java.lang.String accountId,
java.lang.String apiKey,
java.lang.String clientId,
org.eclipse.paho.client.mqttv3.IMqttAsyncClient client)
throws org.eclipse.paho.client.mqttv3.MqttException
org.eclipse.paho.client.mqttv3.MqttExceptionpublic void publish(java.lang.String topic,
byte[] payload)
throws MqttException
MqttExceptionpublic void subscribe(java.lang.String topic)
public void onMessage(MqttMessageHandler handler)
public void disconnect()
throws MqttException
MqttException