{"version":3,"sources":["../../../packages/core/rpc/notification/rpc-notification-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,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAsB,MAAM,0BAA0B,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,OAAO,CAAC,YAAY,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;CAAG;AAE/F;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAE,YAAW,sBAAsB;IACvH;;OAEG;gBACS,GAAG,EAAE,GAAG;IAIpB;;;;;OAKG;IACI,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAGvD","file":"rpc-notification-subject-server.d.ts","sourcesContent":["import { Subject } from 'rxjs';\r\nimport { DeferredData, Rpc } from '../rpc';\r\nimport { RpcSubjectServer } from '../rpc-subject-server';\r\nimport { RpcNotificationHandler } from './rpc-notification-handler';\r\nimport { RpcNotification, RpcNotificationKey } from './rpc-notification-model';\r\n\r\n/**\r\n * Rpc notification subject interface.\r\n */\r\nexport interface RpcNotificationSubject extends Subject<DeferredData<RpcNotification, void>> {}\r\n\r\n/**\r\n * The class to implement Rpc notification with Subject server.\r\n */\r\nexport class RpcNotificationSubjectServer extends RpcSubjectServer<RpcNotification, void> implements RpcNotificationHandler {\r\n    /**\r\n     * Initializes a new instance of the RpcNotificationSubjectServer class.\r\n     */\r\n    constructor(rpc: Rpc) {\r\n        super(rpc, RpcNotificationKey.command);\r\n    }\r\n\r\n    /**\r\n     * The handler to respond a request for Rpc notification call.\r\n     *\r\n     * @param data The notification object.\r\n     * @returns return the Promise<void> object.\r\n     */\r\n    public handler(data: RpcNotification): Promise<void> {\r\n        return this.processNextForSubject(RpcNotificationKey.command, data);\r\n    }\r\n}\r\n"]}