vertx-lang-scala-docs_2.12 3.6.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package mqtt
  Definition Classes
    scala
-  package messages
  Definition Classes
    mqtt
- MqttAuth
- MqttClient
- MqttClientOptions
- MqttEndpoint
- MqttServer
- MqttServerOptions
- MqttTopicSubscription
- MqttWill

c

io.vertx.scala.mqtt

# MqttEndpoint 

###
Companion object MqttEndpoint

#### class MqttEndpoint extends AnyRef

Represents an MQTT endpoint for point-to-point communication with the remote MQTT client

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. MqttEndpoint
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new MqttEndpoint(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  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

5.  def accept(): MqttEndpoint

   Like io.vertx.scala.mqtt.MqttEndpoint#accept with no session is present.

6.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
7.  def asJava: AnyRef
8.  def auth(): MqttAuth

   returns

     the Authentication information as provided by the remote MQTT clientsee MqttAuth

9.  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

10.  def clientIdentifier(): String

    returns

      the client identifier as provided by the remote MQTT client

11.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )
12.  def close(): Unit

    Close the endpoint, so the connection with remote MQTT client

13.  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

14.  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

15.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
16.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
17.  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

18.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
19.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
20.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  def isAutoKeepAlive(): Boolean

    returns

      the auto keep alive status (sending ping response)

22.  def isCleanSession(): Boolean

    returns

      true when clean session is requested by the remote MQTT client

23.  def isConnected(): Boolean

    returns

      if the connection between remote client and local endpoint is established/open

24.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
25.  def isPublishAutoAck(): Boolean

    returns

      auto acknowledge status for publishing (in/out)

26.  def isSsl(): Boolean

    returns

      true if this io.vertx.scala.mqtt.MqttEndpoint is encrypted via SSL/TLS.

27.  def isSubscriptionAutoAck(): Boolean

    returns

      true when auto acknowledge status for subscription/unsubscription requests

28.  def keepAliveTimeSeconds(): Int

    returns

      the keep alive timeout (in seconds) specified by the remote MQTT client

29.  def lastMessageId(): Int

    returns

      the message identifier used for last published message

30.  def localAddress(): SocketAddress

    returns

      the local address for this socket

31.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
32.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
33.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
34.  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

35.  def pong(): MqttEndpoint

    Sends the PINGRESP message to the remote MQTT client * @return a reference to this, so the API can be used fluently

36.  def protocolName(): String

    returns

      the protocol name provided by the remote MQTT client

37.  def protocolVersion(): Int

    returns

      the protocol version required by the remote MQTT client

38.  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

39.  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

40.  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

41.  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

42.  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

43.  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

44.  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

45.  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.

46.  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

47.  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

48.  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

49.  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

50.  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

51.  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

52.  def remoteAddress(): SocketAddress

    returns

      the remote address for this socket

53.  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

54.  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

55.  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

56.  def subscriptionAutoAck(isSubscriptionAutoAck: Boolean): Unit

    Enable/disable subscription/unsubscription requests auto acknowledge * @param isSubscriptionAutoAck auto acknowledge status

57.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
58.  def toString(): String
    Definition Classes
      AnyRef → Any
59.  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

60.  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

61.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
62.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
63.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )
64.  def will(): MqttWill

    returns

      the Will information as provided by the remote MQTT clientsee MqttWill

### Inherited from AnyRef

### Inherited from Any

### Ungrouped