Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MqttConnection

Hierarchy

  • MqttConnection

Index

Constructors

constructor

  • new MqttConnection(url: string, identityId: string, renderer: IRenderer, listener: IListener, username?: string | null, password?: string | null): MqttConnection

Properties

Private behaviourBind

behaviourBind: Array<string> = []

Private callbacks

callbacks: Map<ChannelType, function> = new Map()

Private clientId

clientId: string

Private identityId

identityId: string

Private listener

listener: IListener

Private mqttClient

mqttClient: MqttClient

Private removeFromEventStream

removeFromEventStream: function

Type declaration

    • (): void
    • Returns void

Private renderer

renderer: IRenderer

Private subscriptions

subscriptions: Array<string> = []

Private userId

userId: string

Methods

bind

Private callback

disconnect

  • disconnect(): MqttClient

Private header

  • header(): object

Private incoming

Private mqttCallback

  • mqttCallback(msg: any): (Anonymous function)

Private onMessage

  • onMessage(topic: string, msg: string): void

Private outgoing

publish

reception

  • reception(attributes?: undefined | object): void
  • Initial request to make the system aware that the user is listening.

    Parameters

    • Optional attributes: undefined | object

    Returns void

subscribe

  • subscribe(type: ChannelType, callback: function): void
  • Subscribes to the given destination.

    Parameters

    • type: ChannelType

      the channel type

    • callback: function

      the callback function

        • (message: object): void
        • Parameters

          • message: object

          Returns void

    Returns void

unsubscribe

  • unsubscribe(destination: string): MqttClient

Generated using TypeDoc