Commit | Line | Data |
---|---|---|
fe94fce0 JB |
1 | import AbstractUIService from './ui-services/AbstractUIService'; |
2 | import { Server as HttpServer } from 'http'; | |
3 | import { ProtocolVersion } from '../../types/UIProtocol'; | |
4 | import { Server as WSServer } from 'ws'; | |
5 | ||
6 | export abstract class AbstractUIServer { | |
7 | public readonly chargingStations: Set<string>; | |
8 | protected readonly uiServices: Map<ProtocolVersion, AbstractUIService>; | |
d200b695 | 9 | protected server: WSServer | HttpServer; |
fe94fce0 JB |
10 | |
11 | public constructor() { | |
12 | this.chargingStations = new Set<string>(); | |
13 | this.uiServices = new Map<ProtocolVersion, AbstractUIService>(); | |
14 | } | |
15 | ||
16 | public abstract start(): void; | |
17 | public abstract stop(): void; | |
18 | public abstract sendResponse(message: string): void; | |
19 | public abstract logPrefix(): string; | |
20 | } |