Refine UI WS service log messages
[e-mobility-charging-stations-simulator.git] / src / charging-station / UIWebSocketServices / UIServiceFactory.ts
CommitLineData
4198ad5c
JB
1import AbstractUIService from './AbstractUIService';
2import { ProtocolVersion } from '../../types/UIProtocol';
3import UIService_0_0_1 from './UIService_0_0_1';
4import UIWebSocketServer from '../UIWebSocketServer';
5
6export default class UIServiceFactory {
7 private constructor() {
8 // This is intentional
9 }
10
11 public static getUIServiceImplementation(version: ProtocolVersion, uiWebSocketServer: UIWebSocketServer): AbstractUIService | null {
12 switch (version) {
13 case ProtocolVersion['0.0.1']:
14 return new UIService_0_0_1(uiWebSocketServer);
15 default:
16 return null;
17 }
18 }
19}