Modifier and Type | Field and Description |
---|---|
protected MqttException |
MqttClient.pendingMessageAckException
The pending message acknowledgment exception returned by the server, or
null if is there is no
pending message or if the acknowledgment returned without error. |
Modifier and Type | Method and Description |
---|---|
void |
MqttClient.close() |
void |
IMqttClient.close()
Close the client Releases all resource associated with the client.
|
void |
MqttClient.connect() |
void |
IMqttClient.connect()
Connects to an MQTT server using the default options.
|
void |
MqttClient.connect(MqttConnectOptions options) |
void |
IMqttClient.connect(MqttConnectOptions options)
Connects to an MQTT server using the specified options.
|
void |
MqttClient.disconnect() |
void |
IMqttClient.disconnect()
Disconnects from the server.
|
void |
MqttClient.publish(java.lang.String topic,
byte[] payload,
int qos,
boolean retained) |
void |
IMqttClient.publish(java.lang.String topic,
byte[] payload,
int qos,
boolean retained)
Publishes a message to a topic on the server and return once it is delivered.
|
void |
MqttClient.publish(java.lang.String topic,
MqttMessage message) |
void |
IMqttClient.publish(java.lang.String topic,
MqttMessage message)
Publishes a message to a topic on the server.
|
void |
MqttClient.subscribe(java.lang.String topicFilter) |
void |
IMqttClient.subscribe(java.lang.String topicFilter)
Subscribe to a topic, which may include wildcards using a QoS of 1.
|
void |
MqttClient.subscribe(java.lang.String topicFilter,
int qos) |
void |
IMqttClient.subscribe(java.lang.String topicFilter,
int qos)
Subscribe to a topic, which may include wildcards.
|
void |
MqttClient.unsubscribe(java.lang.String topicFilter) |
void |
IMqttClient.unsubscribe(java.lang.String topicFilter)
Requests the server unsubscribe the client from a topic.
|
Constructor and Description |
---|
MqttClient(java.lang.String serverURI,
java.lang.String clientId)
Create an MqttClient that can be used to communicate with an MQTT server.
|