vertx-lang-scala-docs_2.12 3.4.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
- 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

   sessionPresent

     if a previous session is present

   returns

     a reference to this, so the API can be used fluently

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

   returns

     the Authentication information as provided by the remote MQTT client

8.  def autoKeepAlive(isAutoKeepAlive: Boolean): MqttEndpoint

   Enable/disable auto keep alive (sending ping response)

   Enable/disable auto keep alive (sending ping response)

   isAutoKeepAlive

     auto keep alive

   returns

     a reference to this, so the API can be used fluently

9.  def clientIdentifier(): String

   returns

     the client identifier as provided by the remote MQTT client

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

    Close the endpoint, so the connection with remote MQTT client

12.  def closeHandler(handler: Handler[Unit]): MqttEndpoint

    Set a close handler.

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

14.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
15.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
16.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
17.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
18.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
19.  def isAutoKeepAlive(): Boolean

    returns

      the auto keep alive status (sending ping response)

20.  def isCleanSession(): Boolean

    returns

      true when clean session is requested by the remote MQTT client

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

    returns

      auto acknowledge status for publishing (in/out)

23.  def isSubscriptionAutoAck(): Boolean

    returns

      true when auto acknowledge status for subscription/unsubscription requests

24.  def keepAliveTimeSeconds(): Int

    returns

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

25.  def lastMessageId(): Int

    returns

      the message identifier used for last published message

26.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
27.  final def notify(): Unit
    Definition Classes
      AnyRef
28.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
29.  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.

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

30.  def pong(): MqttEndpoint

    Sends the PINGRESP message to the remote MQTT client

    Sends the PINGRESP message to the remote MQTT client

    returns

      a reference to this, so the API can be used fluently

31.  def protocolName(): String

    returns

      the protocol name provided by the remote MQTT client

32.  def protocolVersion(): Int

    returns

      the protocol version required by the remote MQTT client

33.  def publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttEndpoint

    Sends the PUBLISH message to the remote MQTT client

    Sends the PUBLISH message to the remote MQTT client

    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

34.  def publishAcknowledge(publishMessageId: Int): MqttEndpoint

    Sends the PUBACK message to the remote MQTT client

    Sends the PUBACK message to the remote MQTT client

    publishMessageId

      identifier of the PUBLISH message to acknowledge

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

36.  def publishAutoAck(isPublishAutoAck: Boolean): MqttEndpoint

    Enable/disable publishing (in/out) auto acknowledge

    Enable/disable publishing (in/out) auto acknowledge

    isPublishAutoAck

      auto acknowledge status

    returns

      a reference to this, so the API can be used fluently

37.  def publishComplete(publishMessageId: Int): MqttEndpoint

    Sends the PUBCOMP message to the remote MQTT client

    Sends the PUBCOMP message to the remote MQTT client

    publishMessageId

      identifier of the PUBLISH message to acknowledge

    returns

      a reference to this, so the API can be used fluently

38.  def publishCompleteHandler(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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

40.  def publishReceived(publishMessageId: Int): MqttEndpoint

    Sends the PUBREC message to the remote MQTT client

    Sends the PUBREC message to the remote MQTT client

    publishMessageId

      identifier of the PUBLISH message to acknowledge

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

42.  def publishRelease(publishMessageId: Int): MqttEndpoint

    Sends the PUBREL message to the remote MQTT client

    Sends the PUBREL message to the remote MQTT client

    publishMessageId

      identifier of the PUBLISH message to acknowledge

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

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

    returnCode

      the connect return code

    returns

      a reference to this, so the API can be used fluently

45.  def subscribeAcknowledge(subscribeMessageId: Int, grantedQoSLevels: Buffer[MqttQoS]): MqttEndpoint

    Sends the SUBACK message to the remote MQTT client

    Sends the SUBACK message to the remote MQTT client

    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

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

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

    Enable/disable subscription/unsubscription requests auto acknowledge

    Enable/disable subscription/unsubscription requests auto acknowledge

    isSubscriptionAutoAck

      auto acknowledge status

48.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
49.  def toString(): String
    Definition Classes
      AnyRef → Any
50.  def unsubscribeAcknowledge(unsubscribeMessageId: Int): MqttEndpoint

    Sends the UNSUBACK message to the remote MQTT client

    Sends the UNSUBACK message to the remote MQTT client

    unsubscribeMessageId

      identifier of the UNSUBSCRIBE message to acknowledge

    returns

      a reference to this, so the API can be used fluently

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

    handler

      the handler

    returns

      a reference to this, so the API can be used fluently

52.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
53.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
54.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
55.  def will(): MqttWill

    returns

      the Will information as provided by the remote MQTT client

### Inherited from AnyRef

### Inherited from Any

### Ungrouped