@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
26 lines (24 loc) • 828 B
JavaScript
import { RpcSubjectServer } from '../rpc-subject-server';
import { RpcReportKey } from './rpc-report-model';
/**
* The class to implement report with Subject server.
*/
export class RpcReportSubjectServer extends RpcSubjectServer {
/**
* Initializes a new instance of the RpcReportSubjectServer class.
*/
constructor(rpc) {
super(rpc, RpcReportKey.command);
}
/**
* The handler to respond a request for report call.
*
* @param data The report object.
* @return Promise<void> the promise object.
*/
handler(data) {
const result = { ...data, ...this.rpc.rpcManager.getSourceStatus(data.sourceName, data.sourceSubName) };
return this.processNextForSubject(RpcReportKey.command, result);
}
}
//# sourceMappingURL=rpc-report-subject-server.js.map