class MqttEndpoint extends AnyRef
Represents an MQTT endpoint for point-to-point communication with the remote MQTT client
- Alphabetic
- By Inheritance
- MqttEndpoint
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MqttEndpoint(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
accept(sessionPresent: Boolean): MqttEndpoint
Sends the CONNACK message to the remote MQTT client with "connection accepted" return code.
Sends the CONNACK message to the remote MQTT client with "connection accepted" return code. See io.vertx.scala.mqtt.MqttEndpoint#reject for refusing connection * @param sessionPresent if a previous session is present
- returns
a reference to this, so the API can be used fluently
-
def
accept(): MqttEndpoint
Like io.vertx.scala.mqtt.MqttEndpoint#accept with no session is present.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
auth(): MqttAuth
- returns
the Authentication information as provided by the remote MQTT clientsee MqttAuth
-
def
autoKeepAlive(isAutoKeepAlive: Boolean): MqttEndpoint
Enable/disable auto keep alive (sending ping response) * @param isAutoKeepAlive auto keep alive
Enable/disable auto keep alive (sending ping response) * @param isAutoKeepAlive auto keep alive
- returns
a reference to this, so the API can be used fluently
-
def
clientIdentifier(): String
- returns
the client identifier as provided by the remote MQTT client
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Close the endpoint, so the connection with remote MQTT client
-
def
closeHandler(handler: Handler[Unit]): MqttEndpoint
Set a close handler.
Set a close handler. This will be called when the MQTT endpoint is closed * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
disconnectHandler(handler: Handler[Unit]): MqttEndpoint
Set a disconnect handler on the MQTT endpoint.
Set a disconnect handler on the MQTT endpoint. This handler is called when a DISCONNECT message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionHandler(handler: Handler[Throwable]): MqttEndpoint
Set an exception handler.
Set an exception handler. This will be called when an error at protocol level happens * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isAutoKeepAlive(): Boolean
- returns
the auto keep alive status (sending ping response)
-
def
isCleanSession(): Boolean
- returns
true when clean session is requested by the remote MQTT client
-
def
isConnected(): Boolean
- returns
if the connection between remote client and local endpoint is established/open
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPublishAutoAck(): Boolean
- returns
auto acknowledge status for publishing (in/out)
-
def
isSsl(): Boolean
- returns
true if this io.vertx.scala.mqtt.MqttEndpoint is encrypted via SSL/TLS.
-
def
isSubscriptionAutoAck(): Boolean
- returns
true when auto acknowledge status for subscription/unsubscription requests
-
def
keepAliveTimeSeconds(): Int
- returns
the keep alive timeout (in seconds) specified by the remote MQTT client
-
def
lastMessageId(): Int
- returns
the message identifier used for last published message
-
def
localAddress(): SocketAddress
- returns
the local address for this socket
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
pingHandler(handler: Handler[Unit]): MqttEndpoint
Set the pingreq handler on the MQTT endpoint.
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. * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
pong(): MqttEndpoint
Sends the PINGRESP message to the remote MQTT client * @return a reference to this, so the API can be used fluently
-
def
protocolName(): String
- returns
the protocol name provided by the remote MQTT client
-
def
protocolVersion(): Int
- returns
the protocol version required by the remote MQTT client
-
def
publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean, publishSentHandler: Handler[AsyncResult[Int]]): MqttEndpoint
Sends the PUBLISH message to the remote MQTT server * @param topic topic on which the message is published
Sends the PUBLISH message to the remote MQTT server * @param topic topic on which the message is published
- payload
message payload
- qosLevel
QoS level
- isDup
if the message is a duplicate
- isRetain
if the message needs to be retained
- publishSentHandler
handler called after PUBLISH packet sent with a packetId
- returns
current MQTT client instance
-
def
publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttEndpoint
Sends the PUBLISH message to the remote MQTT client * @param topic topic on which the message is published
Sends the PUBLISH message to the remote MQTT client * @param topic topic on which the message is published
- payload
message payload
- qosLevel
quality of service level
- isDup
if the message is a duplicate
- isRetain
if the message needs to be retained
- returns
a reference to this, so the API can be used fluently
-
def
publishAcknowledge(publishMessageId: Int): MqttEndpoint
Sends the PUBACK message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
Sends the PUBACK message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
- returns
a reference to this, so the API can be used fluently
-
def
publishAcknowledgeHandler(handler: Handler[Int]): MqttEndpoint
Set the puback handler on the MQTT endpoint.
Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
publishAutoAck(isPublishAutoAck: Boolean): MqttEndpoint
Enable/disable publishing (in/out) auto acknowledge * @param isPublishAutoAck auto acknowledge status
Enable/disable publishing (in/out) auto acknowledge * @param isPublishAutoAck auto acknowledge status
- returns
a reference to this, so the API can be used fluently
-
def
publishComplete(publishMessageId: Int): MqttEndpoint
Sends the PUBCOMP message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
Sends the PUBCOMP message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
- returns
a reference to this, so the API can be used fluently
-
def
publishCompletionHandler(handler: Handler[Int]): MqttEndpoint
Set the pubcomp handler on the MQTT endpoint.
Set the pubcomp handler on the MQTT endpoint. This handler is called when a PUBCOMP message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
publishFuture(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): Future[Int]
Like publish but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
publishHandler(handler: Handler[MqttPublishMessage]): MqttEndpoint
Set the publish handler on the MQTT endpoint.
Set the publish handler on the MQTT endpoint. This handler is called when a PUBLISH message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
publishReceived(publishMessageId: Int): MqttEndpoint
Sends the PUBREC message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
Sends the PUBREC message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
- returns
a reference to this, so the API can be used fluently
-
def
publishReceivedHandler(handler: Handler[Int]): MqttEndpoint
Set the pubrec handler on the MQTT endpoint.
Set the pubrec handler on the MQTT endpoint. This handler is called when a PUBREC message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
publishRelease(publishMessageId: Int): MqttEndpoint
Sends the PUBREL message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
Sends the PUBREL message to the remote MQTT client * @param publishMessageId identifier of the PUBLISH message to acknowledge
- returns
a reference to this, so the API can be used fluently
-
def
publishReleaseHandler(handler: Handler[Int]): MqttEndpoint
Set the pubrel handler on the MQTT endpoint.
Set the pubrel handler on the MQTT endpoint. This handler is called when a PUBREL message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
reject(returnCode: MqttConnectReturnCode): MqttEndpoint
Sends the CONNACK message to the remote MQTT client rejecting the connection request with specified return code.
Sends the CONNACK message to the remote MQTT client rejecting the connection request with specified return code. See io.vertx.scala.mqtt.MqttEndpoint#accept for accepting connection * @param returnCode the connect return code
- returns
a reference to this, so the API can be used fluently
-
def
remoteAddress(): SocketAddress
- returns
the remote address for this socket
-
def
setClientIdentifier(clientIdentifier: String): MqttEndpoint
Set client identifier if not provided by the remote MQTT client (zero-bytes) * @param clientIdentifier the client identifier
Set client identifier if not provided by the remote MQTT client (zero-bytes) * @param clientIdentifier the client identifier
- returns
a reference to this, so the API can be used fluently
-
def
subscribeAcknowledge(subscribeMessageId: Int, grantedQoSLevels: Buffer[MqttQoS]): MqttEndpoint
Sends the SUBACK message to the remote MQTT client * @param subscribeMessageId identifier of the SUBSCRIBE message to acknowledge
Sends the SUBACK message to the remote MQTT client * @param subscribeMessageId identifier of the SUBSCRIBE message to acknowledge
- grantedQoSLevels
granted QoS levels for the requested topics
- returns
a reference to this, so the API can be used fluently
-
def
subscribeHandler(handler: Handler[MqttSubscribeMessage]): MqttEndpoint
Set a subscribe handler on the MQTT endpoint.
Set a subscribe handler on the MQTT endpoint. This handler is called when a SUBSCRIBE message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
def
subscriptionAutoAck(isSubscriptionAutoAck: Boolean): Unit
Enable/disable subscription/unsubscription requests auto acknowledge * @param isSubscriptionAutoAck auto acknowledge status
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unsubscribeAcknowledge(unsubscribeMessageId: Int): MqttEndpoint
Sends the UNSUBACK message to the remote MQTT client * @param unsubscribeMessageId identifier of the UNSUBSCRIBE message to acknowledge
Sends the UNSUBACK message to the remote MQTT client * @param unsubscribeMessageId identifier of the UNSUBSCRIBE message to acknowledge
- returns
a reference to this, so the API can be used fluently
-
def
unsubscribeHandler(handler: Handler[MqttUnsubscribeMessage]): MqttEndpoint
Set a unsubscribe handler on the MQTT endpoint.
Set a unsubscribe handler on the MQTT endpoint. This handler is called when a UNSUBSCRIBE message is received by the remote MQTT client * @param handler the handler
- returns
a reference to this, so the API can be used fluently
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
will(): MqttWill
- returns
the Will information as provided by the remote MQTT clientsee MqttWill