PahoObservableMqttClientpublic interface ObservableMqttClient
| Modifier and Type | Method | Description |
|---|---|---|
io.reactivex.Completable |
close() |
Close the MQTT client
|
io.reactivex.Completable |
connect() |
Connect the MQTT client
|
io.reactivex.Completable |
disconnect() |
Disconnect the MQTT client
|
String |
getBrokerUri() |
Get the MQTT broker URI
|
String |
getClientId() |
Get the MQTT client id from the underlying MQTT client
|
boolean |
isConnected() |
Whether the MQTT client is connected to the broker
|
io.reactivex.Single<PublishToken> |
publish(String topic,
PublishMessage msg) |
Publish an
PublishMessage to a String topic at the given
QOS level |
io.reactivex.Flowable<SubscribeMessage> |
subscribe(String[] topics,
int[] qos) |
Subscribe to multiple
String topics to receive multiple
SubscribeMessage at the given QOS levels |
io.reactivex.Flowable<SubscribeMessage> |
subscribe(String topic,
int qos) |
Subscribe to a
String topic to receive multiple
SubscribeMessage at the supplied QOS level |
io.reactivex.Completable |
unsubscribe(String topic) |
Unsubscribe from the given topic
String |
io.reactivex.Completable |
unsubscribe(String[] topics) |
Unsubscribe from the given topics
String array |
String getBrokerUri()
String getClientId()
String client identifierboolean isConnected()
true if connected, false otherwiseio.reactivex.Completable close()
Completable that will complete on successful closureio.reactivex.Completable connect()
Completable that will complete on successful connectionio.reactivex.Completable disconnect()
Completable that will complete on successful
disconnectionio.reactivex.Single<PublishToken> publish(String topic, PublishMessage msg)
PublishMessage to a String topic at the given
QOS levelSingle that will complete on successful publication with
a PublishTokenio.reactivex.Flowable<SubscribeMessage> subscribe(String[] topics, int[] qos)
String topics to receive multiple
SubscribeMessage at the given QOS levelsFlowable that will receive multiple
SubscribeMessageio.reactivex.Flowable<SubscribeMessage> subscribe(String topic, int qos)
String topic to receive multiple
SubscribeMessage at the supplied QOS levelFlowable that will receive multiple
SubscribeMessageio.reactivex.Completable unsubscribe(String[] topics)
String arrayCompletable that will complete on successful unsubscribeCopyright © 2018. All rights reserved.