Path: blob/main/components/gitpod-protocol/src/messaging/handler.ts
2500 views
/*1* Copyright (C) 2017 TypeFox and others.2*3* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.4* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.05*/67import { MessageConnection } from "vscode-jsonrpc";89export const ConnectionHandler = Symbol("ConnectionHandler");1011export interface ConnectionHandler {12readonly path: string;13onConnection(connection: MessageConnection, session?: object): void;14}1516export interface ConnectionEventHandler {17/**18* Called when the transport underpinning the connection got closed19*/20onTransportDidClose(): void;2122/**23* Called when the transport underpinning the connection is (re-)opened24*/25onTransportDidOpen(): void;26}272829