Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServerMqtt

Hierarchy

Implements

  • any

Index

Constructors

constructor

Properties

Protected logger

logger: any = new Logger(Server.name)

Protected messageHandlers

messageHandlers: any = new Map<string, MessageHandler>()

Private mqttClient

mqttClient: MqttClient

Private options

options: any

Private url

url: string

Methods

addHandler

  • addHandler(pattern: any, callback: MessageHandler, isEventHandler?: boolean): void

bindEvents

close

  • close(): void

createMqttClient

deserialize

getAckQueueName

  • getAckQueueName(pattern: string): string

getHandlerByPattern

getHandlers

getMessageHandler

getOptionsProp

  • getOptionsProp<T, K>(obj: T, prop: K, defaultValue?: T[K]): T[K]

getPublisher

  • getPublisher(client: MqttClient, pattern: any, id: string): any

getResQueueName

  • getResQueueName(pattern: string): string

handleError

  • handleError(stream: any): void

handleEvent

  • handleEvent(pattern: string, packet: ReadPacket): Promise<any>

handleMessage

  • handleMessage(channel: string, buffer: Buffer, pub: MqttClient): Promise<any>

listen

  • listen(callback: function): Promise<void>

Protected loadPackage

  • loadPackage<T>(name: string, ctx: string, loader?: Function): T

send

  • send(stream$: Observable<any>, respond: function): Subscription

start

  • start(callback?: function): void

transformToObservable

  • transformToObservable<T>(resultOrDeffered: any): Observable<T>

Generated using TypeDoc