(workspaceId: string, sessionId: number)
| 406 | } |
| 407 | |
| 408 | private getOwnedSession(workspaceId: string, sessionId: number): ProcessSession { |
| 409 | const session = this.sessions.get(sessionId); |
| 410 | if (!session) throw new Error(`Unknown process session: ${sessionId}`); |
| 411 | if (session.workspaceId !== workspaceId) { |
| 412 | throw new Error(`Process session ${sessionId} does not belong to workspace ${workspaceId}.`); |
| 413 | } |
| 414 | return session; |
| 415 | } |
| 416 | |
| 417 | private removeSession(sessionId: number): void { |
| 418 | const session = this.sessions.get(sessionId); |