public interface MqttPublishCallback
MqttPublishCallback
interface provides subscription callback
and enumerates the message types.Modifier and Type | Field and Description |
---|---|
static int |
MQTT_CONNACK
Connection acknowledgement.
|
static int |
MQTT_CONNECT
Connect.
|
static int |
MQTT_DISCONNECT
Disconnect.
|
static int |
MQTT_INVALID_RESP
Invalid response.
|
static int |
MQTT_MQTT_NO_RESPONSE_MSG_REQD
No response message is required.
|
static int |
MQTT_PINGREQ
Ping request.
|
static int |
MQTT_PINGRESP
Ping response.
|
static int |
MQTT_PUBACK
Publish acknowledgement.
|
static int |
MQTT_PUBCOMP
PubComp.
|
static int |
MQTT_PUBLISH
Publish.
|
static int |
MQTT_PUBREC
PubRec.
|
static int |
MQTT_PUBREL
PubRel.
|
static int |
MQTT_SUBACK
Subscribe acknowledgement.
|
static int |
MQTT_SUBSCRIBE
Subscribe.
|
static int |
MQTT_UNSUBACK
Unsubscribe acknowledgement.
|
static int |
MQTT_UNSUBSCRIBE
Unsubscribe.
|
Modifier and Type | Method and Description |
---|---|
void |
onPublishEvent(int messageType,
int qos,
short messageId)
Called when a publish notification PUBACK(QOS1)/PUBREC,PUBCOMP(QOS2) is
received.
|
static final int MQTT_CONNACK
static final int MQTT_CONNECT
static final int MQTT_DISCONNECT
static final int MQTT_INVALID_RESP
static final int MQTT_MQTT_NO_RESPONSE_MSG_REQD
static final int MQTT_PINGREQ
static final int MQTT_PINGRESP
static final int MQTT_PUBACK
static final int MQTT_PUBCOMP
static final int MQTT_PUBLISH
static final int MQTT_PUBREC
static final int MQTT_PUBREL
static final int MQTT_SUBACK
static final int MQTT_SUBSCRIBE
static final int MQTT_UNSUBACK
static final int MQTT_UNSUBSCRIBE
void onPublishEvent(int messageType, int qos, short messageId)
messageType
- Message type.qos
- MQTT QoS used.messageId
- Message ID of the MQTT publish message.MqttClient.subscribe(String, int)