Commit | Line | Data |
---|---|---|
4198ad5c | 1 | import AbstractUIService from './AbstractUIService'; |
1f5df42a | 2 | import { ProtocolVersion } from '../../types/UiProtocol'; |
f16356b9 | 3 | import UIService001 from './UIService001'; |
4198ad5c JB |
4 | import UIWebSocketServer from '../UIWebSocketServer'; |
5 | ||
6 | export 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']: | |
f16356b9 | 14 | return new UIService001(uiWebSocketServer); |
4198ad5c JB |
15 | default: |
16 | return null; | |
17 | } | |
18 | } | |
19 | } |