432c91e7140916089fc393430ae1922e5e2baf31
1 import { Server
as HttpServer
} from
'http';
3 import WebSocket from
'ws';
5 import { ProtocolVersion
} from
'../../types/UIProtocol';
6 import AbstractUIService from
'./ui-services/AbstractUIService';
8 export abstract class AbstractUIServer
{
9 public readonly chargingStations
: Set
<string>;
10 protected readonly uiServices
: Map
<ProtocolVersion
, AbstractUIService
>;
11 protected server
: WebSocket
.Server
| HttpServer
;
13 public constructor() {
14 this.chargingStations
= new Set
<string>();
15 this.uiServices
= new Map
<ProtocolVersion
, AbstractUIService
>();
18 public abstract start(): void;
19 public abstract stop(): void;
20 public abstract sendResponse(message
: string): void;
21 public abstract logPrefix(): string;