UI Server: refine methods scope
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 9 Sep 2022 05:15:09 +0000 (07:15 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 9 Sep 2022 05:15:09 +0000 (07:15 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ui-server/ui-services/AbstractUIService.ts

index 2cfd85fa97081eafa45116a2d5f886c1ef4f97a2..0db59cca3549695a1f9fad5e255483e57e5796ed 100644 (file)
@@ -127,7 +127,21 @@ export default abstract class AbstractUIService {
     return this.broadcastChannelRequests.get(uuid) ?? 0;
   }
 
-  protected sendBroadcastChannelRequest(
+  protected handleProtocolRequest(
+    uuid: string,
+    procedureName: ProcedureName,
+    payload: RequestPayload
+  ): void {
+    this.sendBroadcastChannelRequest(
+      uuid,
+      AbstractUIService.ProcedureNameToBroadCastChannelProcedureNameMap[
+        procedureName
+      ] as BroadcastChannelProcedureName,
+      payload
+    );
+  }
+
+  private sendBroadcastChannelRequest(
     uuid: string,
     procedureName: BroadcastChannelProcedureName,
     payload: BroadcastChannelRequestPayload
@@ -154,20 +168,6 @@ export default abstract class AbstractUIService {
     this.broadcastChannelRequests.set(uuid, expectedNumberOfResponses);
   }
 
-  protected handleProtocolRequest(
-    uuid: string,
-    procedureName: ProcedureName,
-    payload: RequestPayload
-  ): void {
-    this.sendBroadcastChannelRequest(
-      uuid,
-      AbstractUIService.ProcedureNameToBroadCastChannelProcedureNameMap[
-        procedureName
-      ] as BroadcastChannelProcedureName,
-      payload
-    );
-  }
-
   private handleListChargingStations(): ResponsePayload {
     return {
       status: ResponseStatus.SUCCESS,