import { Observable, Subject } from 'rxjs'; import { SuccessfulMessageResponse } from './message-response.type'; import { Message } from './message.interface'; import { LISTEN, RESPONSE, TERMINATE_MESSAGE$ } from './selectors'; /** * Message Host */ export declare abstract class MessageHost { #private; /** * Message Terminator Subject * * Use `next(messageId)` method to terminate a message connection */ protected readonly [TERMINATE_MESSAGE$]: Subject; /** * Run this method to start listening the requests */ protected readonly [LISTEN]: (messages$: Observable) => void; /** * Build a reponse method to send the responses to the requests by using the communication methods of the platform * * @param message Incoming response message */ protected abstract [RESPONSE](message: SuccessfulMessageResponse): void; }