vertx / io.vertx.rxjava.mqtt / MqttEndpoint

MqttEndpoint

open class MqttEndpoint

Represents an MQTT endpoint for point-to-point communication with the remote MQTT client NOTE: This class has been automatically generated from the io.vertx.mqtt.MqttEndpoint non RX-ified interface using Vert.x codegen.

Constructors

<init>

MqttEndpoint(delegate: MqttEndpoint)

Properties

__TYPE_ARG

static val __TYPE_ARG: TypeArg<MqttEndpoint>

Functions

accept

open fun accept(sessionPresent: Boolean): MqttEndpoint

Sends the CONNACK message to the remote MQTT client with "connection accepted" return code. See io.vertx.rxjava.mqtt.MqttEndpoint#reject for refusing connection

auth

open fun auth(): MqttAuth

autoKeepAlive

open fun autoKeepAlive(isAutoKeepAlive: Boolean): MqttEndpoint

Enable/disable auto keep alive (sending ping response)

clientIdentifier

open fun clientIdentifier(): String

close

open fun close(): Unit

Close the endpoint, so the connection with remote MQTT client

closeHandler

open fun closeHandler(handler: Handler<Void>): MqttEndpoint

Set a close handler. This will be called when the MQTT endpoint is closed

disconnectHandler

open fun disconnectHandler(handler: Handler<Void>): MqttEndpoint

Set a disconnect handler on the MQTT endpoint. This handler is called when a DISCONNECT message is received by the remote MQTT client

equals

open fun equals(other: Any?): Boolean

exceptionHandler

open fun exceptionHandler(handler: Handler<Throwable>): MqttEndpoint

Set an exception handler. This will be called when an error at protocol level happens

getDelegate

open fun getDelegate(): MqttEndpoint

hashCode

open fun hashCode(): Int

isAutoKeepAlive

open fun isAutoKeepAlive(): Boolean

isCleanSession

open fun isCleanSession(): Boolean

isConnected

open fun isConnected(): Boolean

isPublishAutoAck

open fun isPublishAutoAck(): Boolean

isSubscriptionAutoAck

open fun isSubscriptionAutoAck(): Boolean

keepAliveTimeSeconds

open fun keepAliveTimeSeconds(): Int

lastMessageId

open fun lastMessageId(): Int

localAddress

open fun localAddress(): SocketAddress

newInstance

open static fun newInstance(arg: MqttEndpoint): MqttEndpoint

pingHandler

open fun pingHandler(handler: Handler<Void>): MqttEndpoint

Set the pingreq handler on the MQTT endpoint. This handler is called when a PINGREQ message is received by the remote MQTT client. In any case the endpoint sends the PINGRESP internally after executing this handler.

pong

open fun pong(): MqttEndpoint

Sends the PINGRESP message to the remote MQTT client

protocolName

open fun protocolName(): String

protocolVersion

open fun protocolVersion(): Int

publish

open fun publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttEndpoint

Sends the PUBLISH message to the remote MQTT client

publishAcknowledge

open fun publishAcknowledge(publishMessageId: Int): MqttEndpoint

Sends the PUBACK message to the remote MQTT client

publishAcknowledgeHandler

open fun publishAcknowledgeHandler(handler: Handler<Int>): MqttEndpoint

Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK message is received by the remote MQTT client

publishAutoAck

open fun publishAutoAck(isPublishAutoAck: Boolean): MqttEndpoint

Enable/disable publishing (in/out) auto acknowledge

publishComplete

open fun publishComplete(publishMessageId: Int): MqttEndpoint

Sends the PUBCOMP message to the remote MQTT client

publishCompletionHandler

open fun publishCompletionHandler(handler: Handler<Int>): MqttEndpoint

Set the pubcomp handler on the MQTT endpoint. This handler is called when a PUBCOMP message is received by the remote MQTT client

publishHandler

open fun publishHandler(handler: Handler<MqttPublishMessage>): MqttEndpoint

Set the publish handler on the MQTT endpoint. This handler is called when a PUBLISH message is received by the remote MQTT client

publishReceived

open fun publishReceived(publishMessageId: Int): MqttEndpoint

Sends the PUBREC message to the remote MQTT client

publishReceivedHandler

open fun publishReceivedHandler(handler: Handler<Int>): MqttEndpoint

Set the pubrec handler on the MQTT endpoint. This handler is called when a PUBREC message is received by the remote MQTT client

publishRelease

open fun publishRelease(publishMessageId: Int): MqttEndpoint

Sends the PUBREL message to the remote MQTT client

publishReleaseHandler

open fun publishReleaseHandler(handler: Handler<Int>): MqttEndpoint

Set the pubrel handler on the MQTT endpoint. This handler is called when a PUBREL message is received by the remote MQTT client

reject

open fun reject(returnCode: MqttConnectReturnCode): MqttEndpoint

Sends the CONNACK message to the remote MQTT client rejecting the connection request with specified return code. See io.vertx.rxjava.mqtt.MqttEndpoint#accept for accepting connection

remoteAddress

open fun remoteAddress(): SocketAddress

setClientIdentifier

open fun setClientIdentifier(clientIdentifier: String): MqttEndpoint

Set client identifier if not provided by the remote MQTT client (zero-bytes)

subscribeAcknowledge

open fun subscribeAcknowledge(subscribeMessageId: Int, grantedQoSLevels: MutableList<MqttQoS>): MqttEndpoint

Sends the SUBACK message to the remote MQTT client

subscribeHandler

open fun subscribeHandler(handler: Handler<MqttSubscribeMessage>): MqttEndpoint

Set a subscribe handler on the MQTT endpoint. This handler is called when a SUBSCRIBE message is received by the remote MQTT client

subscriptionAutoAck

open fun subscriptionAutoAck(isSubscriptionAutoAck: Boolean): Unit

Enable/disable subscription/unsubscription requests auto acknowledge

toString

open fun toString(): String

unsubscribeAcknowledge

open fun unsubscribeAcknowledge(unsubscribeMessageId: Int): MqttEndpoint

Sends the UNSUBACK message to the remote MQTT client

unsubscribeHandler

open fun unsubscribeHandler(handler: Handler<MqttUnsubscribeMessage>): MqttEndpoint

Set a unsubscribe handler on the MQTT endpoint. This handler is called when a UNSUBSCRIBE message is received by the remote MQTT client

will

open fun will(): MqttWill