| 8 | } |
| 9 | |
| 10 | export class SessionCtrlHandler implements CommandHandler { |
| 11 | accept_command: string[] = ['close_session', 'set_session_id']; |
| 12 | |
| 13 | constructor(readonly session: Session) { |
| 14 | } |
| 15 | |
| 16 | handle_message(msg: Command) { |
| 17 | if (msg.command == 'close_session') |
| 18 | this.session.close_session(); |
| 19 | else if (msg.command == 'set_session_id') |
| 20 | this.session.webio_session_id = msg.spec; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export class CommandDispatcher { |
| 25 | command2handler: { [cmd: string]: CommandHandler } = {}; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…