/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/********************************************************************************
 * Copyright (c) 2021-2023 EclipseSource and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
 * with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 ********************************************************************************/
import * as childProcess from 'child_process';
import * as net from 'net';
import * as vscode from 'vscode';
export interface SocketServerLauncherOptions {
    /** Path to the location of the server executable (JAR or node module) that should be launched as process */
    readonly executable: string;
    /** Socket connection on which the server should listen for new client connections */
    socketConnectionOptions: net.TcpSocketConnectOpts;
    /** Set to `true` if server stdout and stderr should be printed in extension host console. Default: `false` */
    readonly logging?: boolean;
    /** Additional arguments that should be passed when starting the server process. */
    readonly additionalArgs?: string[];
}
/**
 * This component can be used to bootstrap your extension when using the default
 * GLSP server implementations, which you can find here:
 * https://github.com/eclipse-glsp/glsp-server
 * https://github.com/eclipse-glsp/glsp-server-node
 *
 * It simply starts up a server executable (JAR or node module) located at a specified path on a specified port.
 * You can pass additional launch arguments through the options.
 *
 * If you need a component to quickly connect your default GLSP server to the GLSP-VSCode
 * integration, take a look at the `SocketGlspVscodeServer` quickstart component.
 */
export declare class GlspSocketServerLauncher implements vscode.Disposable {
    protected readonly options: Required<SocketServerLauncherOptions>;
    protected serverProcess?: childProcess.ChildProcess;
    constructor(options: SocketServerLauncherOptions);
    /**
     * Starts up the server.
     */
    start(): Promise<void>;
    protected configureProcess(process: childProcess.ChildProcessWithoutNullStreams): Promise<void>;
    protected startProcess(): childProcess.ChildProcessWithoutNullStreams;
    protected startJavaProcess(): childProcess.ChildProcessWithoutNullStreams;
    protected startNodeProcess(): childProcess.ChildProcessWithoutNullStreams;
    protected getPortFromStartupMessage(message: string): number | undefined;
    protected handleStdoutData(data: string | Buffer): void;
    protected handleStderrData(data: string | Buffer): void;
    protected handleProcessError(error: Error): never;
    getPort(): number;
    /**
     * Stops the server.
     */
    stop(): void;
    dispose(): void;
}
//# sourceMappingURL=glsp-socket-server-launcher.d.ts.map