open class MqttClient
An MQTT client NOTE: This class has been automatically generated from the io.vertx.mqtt.MqttClient non RX-ified interface using Vert.x codegen.
MqttClient(delegate: MqttClient) |
static val __TYPE_ARG: TypeArg<MqttClient> |
open fun clientId(): String |
|
open fun closeHandler(closeHandler: Handler<Void>): MqttClient
Set a handler that will be called when the connection with server is closed |
|
open fun connect(port: Int, host: String, connectHandler: Handler<AsyncResult<MqttConnAckMessage>>): MqttClientopen fun connect(port: Int, host: String, serverName: String, connectHandler: Handler<AsyncResult<MqttConnAckMessage>>): MqttClient
Connects to an MQTT server calling connectHandler after connection |
|
open static fun create(vertx: Vertx, options: MqttClientOptions): MqttClient
Return an MQTT client instance open static fun create(vertx: Vertx): MqttClient
Return an MQTT client instance using the default options |
|
open fun disconnect(): MqttClient
Disconnects from the MQTT server open fun disconnect(disconnectHandler: Handler<AsyncResult<Void>>): MqttClient
Disconnects from the MQTT server calling disconnectHandler after disconnection |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): MqttClient
Set an exception handler for the client, that will be called when an error happens in internal netty structures. |
|
open fun getDelegate(): MqttClient |
|
open fun hashCode(): Int |
|
open static fun newInstance(arg: MqttClient): MqttClient |
|
open fun ping(): MqttClient
This method is needed by the client in order to avoid server closes the connection due to the keep alive timeout if client has no messages to send |
|
open fun pingResponseHandler(pingResponseHandler: Handler<Void>): MqttClient
Sets handler which will be called after PINGRESP packet receiving |
|
open fun publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttClientopen fun publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean, publishSentHandler: Handler<AsyncResult<Int>>): MqttClient
Sends the PUBLISH message to the remote MQTT server |
|
open fun publishCompletionHandler(publishCompletionHandler: Handler<Int>): MqttClient
Sets handler which will be called each time publish is completed |
|
open fun publishHandler(publishHandler: Handler<MqttPublishMessage>): MqttClient
Sets handler which will be called each time server publish something to client |
|
open fun rxConnect(port: Int, host: String): Single<MqttConnAckMessage>open fun rxConnect(port: Int, host: String, serverName: String): Single<MqttConnAckMessage>
Connects to an MQTT server calling connectHandler after connection |
|
open fun rxDisconnect(): Completable
Disconnects from the MQTT server calling disconnectHandler after disconnection |
|
open fun rxPublish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): Single<Int>
Sends the PUBLISH message to the remote MQTT server |
|
open fun rxSubscribe(topic: String, qos: Int): Single<Int>
Subscribes to the topic with a specified QoS level open fun rxSubscribe(topics: MutableMap<String, Int>): Single<Int>
Subscribes to the topic and adds a handler which will be called after the request is sent |
|
open fun rxUnsubscribe(topic: String): Single<Int>
Unsubscribe from receiving messages on given topic |
|
open fun subscribe(topic: String, qos: Int): MqttClientopen fun subscribe(topic: String, qos: Int, subscribeSentHandler: Handler<AsyncResult<Int>>): MqttClient
Subscribes to the topic with a specified QoS level open fun subscribe(topics: MutableMap<String, Int>): MqttClient
Subscribes to the topics with related QoS levels open fun subscribe(topics: MutableMap<String, Int>, subscribeSentHandler: Handler<AsyncResult<Int>>): MqttClient
Subscribes to the topic and adds a handler which will be called after the request is sent |
|
open fun subscribeCompletionHandler(subscribeCompletionHandler: Handler<MqttSubAckMessage>): MqttClient
Sets handler which will be called after SUBACK packet receiving |
|
open fun toString(): String |
|
open fun unsubscribe(topic: String): MqttClientopen fun unsubscribe(topic: String, unsubscribeSentHandler: Handler<AsyncResult<Int>>): MqttClient
Unsubscribe from receiving messages on given topic |
|
open fun unsubscribeCompletionHandler(unsubscribeCompletionHandler: Handler<Int>): MqttClient
Sets handler which will be called after UNSUBACK packet receiving |