Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientMqtt

Hierarchy

Index

Constructors

constructor

  • new ClientMqtt(options: MqttOptions["options"]): ClientMqtt

Properties

Protected connection

connection: Promise<any>

Protected deserializer

deserializer: ProducerDeserializer

Protected Readonly logger

logger: Logger = new Logger(ClientProxy.name)

Protected mqttClient

mqttClient: MqttClient

Protected Readonly options

options: MqttOptions["options"]

Protected routingMap

routingMap: Map<string, Function> = new Map<string, Function>()

Protected serializer

serializer: ProducerSerializer

Protected Readonly subscriptionsCount

subscriptionsCount: Map<string, number> = new Map<string, number>()

Protected Readonly url

url: string

Methods

Protected assignPacketId

close

  • close(): void

connect

  • connect(): Promise<any>

Protected connect$

  • connect$(instance: any, errorEvent?: string, connectEvent?: string): Observable<any>

createClient

Protected createObserver

  • createObserver<T>(observer: Observer<T>): (packet: WritePacket) => void

createResponseCallback

  • createResponseCallback(): (channel: string, buffer: Buffer) => any

Protected dispatchEvent

emit

  • emit<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected getOptionsProp

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

getRequestPattern

  • getRequestPattern(pattern: string): string

getResponsePattern

  • getResponsePattern(pattern: string): string

handleError

Protected initializeDeserializer

  • initializeDeserializer(options: ClientOptions["options"]): void

Protected initializeSerializer

  • initializeSerializer(options: ClientOptions["options"]): void

mergeCloseEvent

  • mergeCloseEvent<T>(instance: MqttClient, source$: Observable<T>): Observable<T>

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

Protected publish

send

  • send<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected unsubscribeFromChannel

  • unsubscribeFromChannel(channel: string): void

Generated using TypeDoc