1 | import { Logger } from '@nestjs/common/services/logger.service';
|
2 | import { Observable } from 'rxjs';
|
3 | import { MqttClient } from '../external/mqtt-client.interface';
|
4 | import { MqttOptions, ReadPacket, WritePacket } from '../interfaces';
|
5 | import { MqttRecordOptions } from '../record-builders/mqtt.record-builder';
|
6 | import { ClientProxy } from './client-proxy';
|
7 |
|
8 |
|
9 |
|
10 | export declare class ClientMqtt extends ClientProxy {
|
11 | protected readonly options: MqttOptions['options'];
|
12 | protected readonly logger: Logger;
|
13 | protected readonly subscriptionsCount: Map<string, number>;
|
14 | protected readonly url: string;
|
15 | protected mqttClient: MqttClient;
|
16 | protected connection: Promise<any>;
|
17 | constructor(options: MqttOptions['options']);
|
18 | getRequestPattern(pattern: string): string;
|
19 | getResponsePattern(pattern: string): string;
|
20 | close(): void;
|
21 | connect(): Promise<any>;
|
22 | mergeCloseEvent<T = any>(instance: MqttClient, source$: Observable<T>): Observable<T>;
|
23 | createClient(): MqttClient;
|
24 | handleError(client: MqttClient): void;
|
25 | createResponseCallback(): (channel: string, buffer: Buffer) => any;
|
26 | protected publish(partialPacket: ReadPacket, callback: (packet: WritePacket) => any): () => void;
|
27 | protected dispatchEvent(packet: ReadPacket): Promise<any>;
|
28 | protected unsubscribeFromChannel(channel: string): void;
|
29 | protected initializeSerializer(options: MqttOptions['options']): void;
|
30 | protected mergePacketOptions(requestOptions?: MqttRecordOptions): MqttRecordOptions | undefined;
|
31 | }
|