public class MqttClientImpl extends Object implements MqttClient
| Constructor and Description |
|---|
MqttClientImpl(io.vertx.core.Vertx vertx,
io.vertx.mqtt.MqttClientOptions options)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
clientId() |
MqttClient |
closeHandler(io.vertx.core.Handler<Void> closeHandler)
See
MqttClient.closeHandler(Handler) for more details |
MqttClient |
connect(int port,
String host,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.mqtt.messages.MqttConnAckMessage>> connectHandler)
See
MqttClient.connect(int, String, Handler) for more details |
MqttClient |
connect(int port,
String host,
String serverName,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.mqtt.messages.MqttConnAckMessage>> connectHandler)
See
MqttClient.connect(int, String, String, Handler) for more details |
MqttClient |
disconnect()
See
MqttClient.disconnect() for more details |
MqttClient |
disconnect(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> disconnectHandler)
See
MqttClient.disconnect(Handler) for more details |
MqttClient |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
See
MqttClient.exceptionHandler(Handler) for more details |
boolean |
isConnected() |
MqttClient |
ping()
See
MqttClient.ping() for more details |
MqttClient |
pingResponseHandler(io.vertx.core.Handler<Void> pingResponseHandler)
See
MqttClient.pingResponseHandler(Handler) for more details |
MqttClient |
publish(String topic,
io.vertx.core.buffer.Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain)
See
MqttClient.publish(String, Buffer, MqttQoS, boolean, boolean) for
more details |
MqttClient |
publish(String topic,
io.vertx.core.buffer.Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> publishSentHandler)
See
MqttClient.publish(String, Buffer, MqttQoS, boolean, boolean, Handler)
for more details |
MqttClient |
publishCompletionHandler(io.vertx.core.Handler<Integer> publishCompletionHandler)
See
MqttClient.publishCompletionHandler(Handler) for more details |
MqttClient |
publishHandler(io.vertx.core.Handler<io.vertx.mqtt.messages.MqttPublishMessage> publishHandler)
See
MqttClient.publishHandler(Handler) for more details |
MqttClient |
subscribe(Map<String,Integer> topics)
See
MqttClient.subscribe(Map) for more details |
MqttClient |
subscribe(Map<String,Integer> topics,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> subscribeSentHandler)
See
MqttClient.subscribe(Map, Handler) for more details |
MqttClient |
subscribe(String topic,
int qos)
See
MqttClient.subscribe(String, int) for more details |
MqttClient |
subscribe(String topic,
int qos,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> subscribeSentHandler)
See
MqttClient.subscribe(String, int, Handler) for more details |
MqttClient |
subscribeCompletionHandler(io.vertx.core.Handler<io.vertx.mqtt.messages.MqttSubAckMessage> subscribeCompletionHandler)
See
MqttClient.subscribeCompletionHandler(Handler) for more details |
MqttClient |
unsubscribe(String topic)
See
MqttClient.unsubscribe(String) )} for more details |
MqttClient |
unsubscribe(String topic,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> unsubscribeSentHandler)
See
MqttClient.unsubscribe(String, Handler) )} for more details |
MqttClient |
unsubscribeCompletionHandler(io.vertx.core.Handler<Integer> unsubscribeCompletionHandler)
See
MqttClient.unsubscribeCompletionHandler(Handler) for more details |
MqttClientImpl |
write(io.netty.handler.codec.mqtt.MqttMessage mqttMessage) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createpublic MqttClientImpl(io.vertx.core.Vertx vertx,
io.vertx.mqtt.MqttClientOptions options)
vertx - Vert.x instanceoptions - MQTT client optionspublic MqttClient connect(int port, String host, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.mqtt.messages.MqttConnAckMessage>> connectHandler)
MqttClient.connect(int, String, Handler) for more detailsconnect in interface MqttClientport - port of the MQTT serverhost - hostname/ip address of the MQTT serverconnectHandler - handler called when the asynchronous connect call endspublic MqttClient connect(int port, String host, String serverName, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.mqtt.messages.MqttConnAckMessage>> connectHandler)
MqttClient.connect(int, String, String, Handler) for more detailsconnect in interface MqttClientport - port of the MQTT serverhost - hostname/ip address of the MQTT serverserverName - the SNI server nameconnectHandler - handler called when the asynchronous connect call endspublic MqttClient disconnect()
MqttClient.disconnect() for more detailsdisconnect in interface MqttClientpublic MqttClient disconnect(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> disconnectHandler)
MqttClient.disconnect(Handler) for more detailsdisconnect in interface MqttClientdisconnectHandler - handler called when asynchronous disconnect call endspublic MqttClient publish(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain)
MqttClient.publish(String, Buffer, MqttQoS, boolean, boolean) for
more detailspublish in interface MqttClienttopic - topic on which the message is publishedpayload - message payloadqosLevel - QoS levelisDup - if the message is a duplicateisRetain - if the message needs to be retainedpublic MqttClient publish(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> publishSentHandler)
MqttClient.publish(String, Buffer, MqttQoS, boolean, boolean, Handler)
for more detailspublish in interface MqttClienttopic - topic on which the message is publishedpayload - message payloadqosLevel - QoS levelisDup - if the message is a duplicateisRetain - if the message needs to be retainedpublishSentHandler - handler called after PUBLISH packet sent with packetid (not when
QoS 0)public MqttClient publishCompletionHandler(io.vertx.core.Handler<Integer> publishCompletionHandler)
MqttClient.publishCompletionHandler(Handler) for more detailspublishCompletionHandler in interface MqttClientpublishCompletionHandler - handler called with the packetIdpublic MqttClient publishHandler(io.vertx.core.Handler<io.vertx.mqtt.messages.MqttPublishMessage> publishHandler)
MqttClient.publishHandler(Handler) for more detailspublishHandler in interface MqttClientpublishHandler - handler to callpublic MqttClient subscribeCompletionHandler(io.vertx.core.Handler<io.vertx.mqtt.messages.MqttSubAckMessage> subscribeCompletionHandler)
MqttClient.subscribeCompletionHandler(Handler) for more detailssubscribeCompletionHandler in interface MqttClientsubscribeCompletionHandler - handler to call. List inside is a granted QoS arraypublic MqttClient subscribe(String topic, int qos)
MqttClient.subscribe(String, int) for more detailssubscribe in interface MqttClienttopic - topic you subscribe onqos - QoS levelpublic MqttClient subscribe(String topic, int qos, io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> subscribeSentHandler)
MqttClient.subscribe(String, int, Handler) for more detailssubscribe in interface MqttClienttopic - topic you subscribe onqos - QoS levelsubscribeSentHandler - handler called after SUBSCRIBE packet sent with packetidpublic MqttClient subscribe(Map<String,Integer> topics)
MqttClient.subscribe(Map) for more detailssubscribe in interface MqttClienttopics - topics and related QoS levels to subscribe topublic MqttClient subscribe(Map<String,Integer> topics, io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> subscribeSentHandler)
MqttClient.subscribe(Map, Handler) for more detailssubscribe in interface MqttClienttopics - topics you subscribe onsubscribeSentHandler - handler called after SUBSCRIBE packet sent with packetidpublic MqttClient unsubscribeCompletionHandler(io.vertx.core.Handler<Integer> unsubscribeCompletionHandler)
MqttClient.unsubscribeCompletionHandler(Handler) for more detailsunsubscribeCompletionHandler in interface MqttClientunsubscribeCompletionHandler - handler to call with the packetidpublic MqttClient unsubscribe(String topic, io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> unsubscribeSentHandler)
MqttClient.unsubscribe(String, Handler) )} for more detailsunsubscribe in interface MqttClienttopic - Topic you want to unsubscribe fromunsubscribeSentHandler - handler called after UNSUBSCRIBE packet sentpublic MqttClient unsubscribe(String topic)
MqttClient.unsubscribe(String) )} for more detailsunsubscribe in interface MqttClienttopic - Topic you want to unsubscribe frompublic MqttClient pingResponseHandler(io.vertx.core.Handler<Void> pingResponseHandler)
MqttClient.pingResponseHandler(Handler) for more detailspingResponseHandler in interface MqttClientpingResponseHandler - handler to callpublic MqttClient exceptionHandler(io.vertx.core.Handler<Throwable> handler)
MqttClient.exceptionHandler(Handler) for more detailsexceptionHandler in interface MqttClienthandler - the exception handlerpublic MqttClient closeHandler(io.vertx.core.Handler<Void> closeHandler)
MqttClient.closeHandler(Handler) for more detailscloseHandler in interface MqttClientcloseHandler - handler to callpublic MqttClient ping()
MqttClient.ping() for more detailsping in interface MqttClientpublic String clientId()
clientId in interface MqttClientpublic boolean isConnected()
isConnected in interface MqttClientpublic MqttClientImpl write(io.netty.handler.codec.mqtt.MqttMessage mqttMessage)
Copyright © 2017. All rights reserved.