refactor: cleanup UI service method namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 May 2023 16:01:22 +0000 (18:01 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 May 2023 16:01:22 +0000 (18:01 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts
src/charging-station/ui-server/AbstractUIServer.ts

index 677843d27c1c479ac4c9e34f98bcd98f38a55a44..802a944525cc4c824e6a282aa048c20ab6a0e9cc 100644 (file)
@@ -129,7 +129,7 @@ export class Bootstrap extends EventEmitter {
 
   public async stop(): Promise<void> {
     if (isMainThread && this.started === true) {
-      await this.uiServer?.sendRequestOnBroadcastChannel(
+      await this.uiServer?.sendInternalRequest(
         this.uiServer.buildProtocolRequest(
           Utils.generateUUID(),
           ProcedureName.STOP_CHARGING_STATION,
index c21185fe2c890d8bc2f293dcb68ba756f1a517ef..36d00e01b5e9b7190c1e91c07aab0fefa589844f 100644 (file)
@@ -46,7 +46,7 @@ export abstract class AbstractUIServer {
     this.chargingStations.clear();
   }
 
-  public async sendRequestOnBroadcastChannel(request: ProtocolRequest): Promise<ProtocolResponse> {
+  public async sendInternalRequest(request: ProtocolRequest): Promise<ProtocolResponse> {
     const protocolVersion = ProtocolVersion['0.0.1'];
     this.registerProtocolVersionUIService(protocolVersion);
     return this.uiServices.get(protocolVersion)?.requestHandler(request);