Packages

class MqttClient extends AnyRef

An MQTT client

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MqttClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MqttClient(_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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: AnyRef
  6. def clientId(): String

    returns

    the client identifier

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def closeHandler(closeHandler: Handler[Unit]): MqttClient

    Set a handler that will be called when the connection with server is closed

    Set a handler that will be called when the connection with server is closed

    closeHandler

    handler to call

    returns

    current MQTT client instance

  9. def connect(connectHandler: Handler[AsyncResult[MqttConnAckMessage]]): MqttClient

    Connects to an MQTT server calling connectHandler after connection

    Connects to an MQTT server calling connectHandler after connection

    connectHandler

    handler called when the asynchronous connect call ends

    returns

    current MQTT client instance

  10. def connect(): MqttClient

    Connects to an MQTT server

    Connects to an MQTT server

    returns

    current MQTT client instance

  11. def connectFuture(): Future[MqttConnAckMessage]

    Like connect but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  12. def disconnect(disconnectHandler: Handler[AsyncResult[Unit]]): MqttClient

    Disconnects from the MQTT server calling disconnectHandler after disconnection

    Disconnects from the MQTT server calling disconnectHandler after disconnection

    disconnectHandler

    handler called when asynchronous disconnect call ends

    returns

    current MQTT client instance

  13. def disconnect(): MqttClient

    Disconnects from the MQTT server

    Disconnects from the MQTT server

    returns

    current MQTT client instance

  14. def disconnectFuture(): Future[Unit]

    Like disconnect but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  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]): MqttClient

    Set an exception handler for the client, that will be called when an error happens in internal netty structures.

    Set an exception handler for the client, that will be called when an error happens in internal netty structures.

    io.netty.handler.codec.DecoderException can be one of the cause

    handler

    the exception handler

    returns

    current MQTT client instance

  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
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  25. def 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

    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

    returns

    current MQTT client instance

  26. def pingResponseHandler(pingResponseHandler: Handler[Unit]): MqttClient

    Sets handler which will be called after PINGRESP packet receiving

    Sets handler which will be called after PINGRESP packet receiving

    pingResponseHandler

    handler to call

    returns

    current MQTT client instance

  27. def 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

    Sends the PUBLISH message to the remote MQTT server

    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 packetid (not when QoS 0)

    returns

    current MQTT client instance

  28. def publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttClient

    Sends the PUBLISH message to the remote MQTT server

    Sends the PUBLISH message to the remote MQTT server

    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

    returns

    current MQTT client instance

  29. def publishCompleteHandler(publishCompleteHandler: Handler[Int]): MqttClient

    Sets handler which will be called each time publish is completed

    Sets handler which will be called each time publish is completed

    publishCompleteHandler

    handler called with the packetId

    returns

    current MQTT client instance

  30. 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.

  31. def publishHandler(publishHandler: Handler[MqttPublishMessage]): MqttClient

    Sets handler which will be called each time server publish something to client

    Sets handler which will be called each time server publish something to client

    publishHandler

    handler to call

    returns

    current MQTT client instance

  32. def subscribe(topics: Map[String, Int], subscribeSentHandler: Handler[AsyncResult[Int]]): MqttClient

    Subscribes to the topic and adds a handler which will be called after the request is sent

    Subscribes to the topic and adds a handler which will be called after the request is sent

    topics

    topics you subscribe on

    subscribeSentHandler

    handler called after SUBSCRIBE packet sent with packetid

    returns

    current MQTT client instance

  33. def subscribe(topics: Map[String, Int]): MqttClient

    Subscribes to the topics with related QoS levels

    Subscribes to the topics with related QoS levels

    topics

    topics and related QoS levels to subscribe to

    returns

    current MQTT client instance

  34. def subscribe(topic: String, qos: Int, subscribeSentHandler: Handler[AsyncResult[Int]]): MqttClient

    Subscribes to the topic with a specified QoS level

    Subscribes to the topic with a specified QoS level

    topic

    topic you subscribe on

    qos

    QoS level

    subscribeSentHandler

    handler called after SUBSCRIBE packet sent with packetid

    returns

    current MQTT client instance

  35. def subscribe(topic: String, qos: Int): MqttClient

    Subscribes to the topic with a specified QoS level

    Subscribes to the topic with a specified QoS level

    topic

    topic you subscribe on

    qos

    QoS level

    returns

    current MQTT client instance

  36. def subscribeCompleteHandler(subscribeCompleteHandler: Handler[MqttSubAckMessage]): MqttClient

    Sets handler which will be called after SUBACK packet receiving

    Sets handler which will be called after SUBACK packet receiving

    subscribeCompleteHandler

    handler to call. List inside is a granted QoS array

    returns

    current MQTT client instance

  37. def subscribeFuture(topics: Map[String, Int]): Future[Int]

    Like subscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  38. def subscribeFuture(topic: String, qos: Int): Future[Int]

    Like subscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. def unsubscribe(topic: String, unsubscribeSentHandler: Handler[AsyncResult[Int]]): MqttClient

    Unsubscribe from receiving messages on given topic

    Unsubscribe from receiving messages on given topic

    topic

    Topic you want to unsubscribe from

    unsubscribeSentHandler

    handler called after UNSUBSCRIBE packet sent

    returns

    current MQTT client instance

  42. def unsubscribe(topic: String): MqttClient

    Unsubscribe from receiving messages on given topic

    Unsubscribe from receiving messages on given topic

    topic

    Topic you want to unsubscribe from

    returns

    current MQTT client instance

  43. def unsubscribeCompleteHandler(unsubscribeCompleteHandler: Handler[Int]): MqttClient

    Sets handler which will be called after UNSUBACK packet receiving

    Sets handler which will be called after UNSUBACK packet receiving

    unsubscribeCompleteHandler

    handler to call with the packetid

    returns

    current MQTT client instance

  44. def unsubscribeFuture(topic: String): Future[Int]

    Like unsubscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped