Fix PENDING state boot notification handling
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-websocket-services / UIServiceFactory.ts
... / ...
CommitLineData
1import AbstractUIService from './AbstractUIService';
2import { ProtocolVersion } from '../../types/UIProtocol';
3import UIService001 from './UIService001';
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 UIService001(uiWebSocketServer);
15 default:
16 return null;
17 }
18 }
19}