{"version":3,"sources":["../../../packages/core/rpc/report/rpc-report-subject-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAgB,MAAM,oBAAoB,CAAC;AAE/F;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,YAAY,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;CAAG;AAE9F;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB,CAAC,oBAAoB,EAAE,IAAI,CAAE,YAAW,gBAAgB;IAChH;;OAEG;gBACS,GAAG,EAAE,GAAG;IAIpB;;;;;OAKG;IACI,OAAO,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D","file":"rpc-report-subject-server.d.ts","sourcesContent":["import { Subject } from 'rxjs';\r\nimport { DeferredData, Rpc } from '../rpc';\r\nimport { RpcSubjectServer } from '../rpc-subject-server';\r\nimport { RpcReportHandler } from './rpc-report-handler';\r\nimport { RpcReportDataInbound, RpcReportDataInternal, RpcReportKey } from './rpc-report-model';\r\n\r\n/**\r\n * Rpc report subject interface.\r\n */\r\nexport interface RpcReportSubject extends Subject<DeferredData<RpcReportDataInbound, void>> {}\r\n\r\n/**\r\n * The class to implement report with Subject server.\r\n */\r\nexport class RpcReportSubjectServer extends RpcSubjectServer<RpcReportDataInbound, void> implements RpcReportHandler {\r\n    /**\r\n     * Initializes a new instance of the RpcReportSubjectServer class.\r\n     */\r\n    constructor(rpc: Rpc) {\r\n        super(rpc, RpcReportKey.command);\r\n    }\r\n\r\n    /**\r\n     * The handler to respond a request for report call.\r\n     *\r\n     * @param data The report object.\r\n     * @return Promise<void> the promise object.\r\n     */\r\n    public handler(data: RpcReportDataInternal): Promise<void> {\r\n        const result: RpcReportDataInbound = { ...data, ...this.rpc.rpcManager.getSourceStatus(data.sourceName, data.sourceSubName) };\r\n        return this.processNextForSubject(RpcReportKey.command, result);\r\n    }\r\n}\r\n"]}