Apply prettier formating
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-websocket-services / UIServiceFactory.ts
CommitLineData
4198ad5c 1import AbstractUIService from './AbstractUIService';
a10297ba 2import { ProtocolVersion } from '../../types/UIProtocol';
f16356b9 3import UIService001 from './UIService001';
4198ad5c
JB
4import UIWebSocketServer from '../UIWebSocketServer';
5
6export default class UIServiceFactory {
7 private constructor() {
8 // This is intentional
9 }
10
e7aeea18
JB
11 public static getUIServiceImplementation(
12 version: ProtocolVersion,
13 uiWebSocketServer: UIWebSocketServer
14 ): AbstractUIService | null {
4198ad5c
JB
15 switch (version) {
16 case ProtocolVersion['0.0.1']:
f16356b9 17 return new UIService001(uiWebSocketServer);
4198ad5c
JB
18 default:
19 return null;
20 }
21 }
22}