import { IDevServer } from "./i-dev-server";
import { IDevServerServeOptions } from "./i-dev-server-serve-options";
import { RequestIndexSubscriber } from "./request-index-subscriber";
/**
 * A class that can generate a HTTP2 development server with support for Gzip and Brotli compression
 */
export declare class DevServer implements IDevServer {
    /**
     * A map between hosts and the underlying HTTP2SecureServers being used to host and listen on them
     * @type {Map<string, Http2SecureServer>}
     */
    private readonly serverMap;
    /**
     * Gets the Set of all currently active serve options
     * @type {Set<IDevServerServeOptions>}
     */
    private readonly activeOptions;
    /**
     * All the subscriber callbacks to invoke when the index is requested.
     * These may optionally return a specific index.html file to resolve
     * @type {Set<RequestIndexSubscriber>}
     */
    private readonly onRequestIndexSubscribers;
    /**
     * Adds a subscriber callback to invoke when the index is requested.
     * This may optionally return a specific index.html file to resolve
     * @param {RequestIndexSubscriber} callback
     */
    onRequestIndex(callback: RequestIndexSubscriber): void;
    /**
     * Gets all currently active options
     * @returns {Set<IDevServerServeOptions>}
     */
    getActiveOptions(): Set<IDevServerServeOptions>;
    /**
     * Starts a new HTTP2 server and listens on the given port
     * @param {IDevServerServeOptions} options
     * @returns {Promise<void>}
     */
    serve(options: IDevServerServeOptions): Promise<void>;
    /**
     * Stops all currently running servers
     * @returns {Promise<void>}
     */
    stop(): Promise<void>;
    /**
     * Listens for "stream" events on the given Http2SecureServer
     * @param {Http2SecureServer} server
     * @param {IDevServerServeOptions} serverOptions
     */
    private listenForServerStream(server, serverOptions);
    /**
     * Stops the server that matches the given options
     * @param {IDevServerServeOptions} options
     * @returns {Promise<void>}
     */
    private stopServerForOptions(options);
    /**
     * Stops the given server (by closing its' connection)
     * @param {Http2SecureServer} server
     * @returns {Promise<void>}
     */
    private stopServer(server);
    /**
     * Gets a Uid to use for the server map
     * @param {IDevServerServeOptions} options
     * @returns {string}
     */
    private getServerMapUid({host, port});
    /**
     * Gets the server that matches the given options
     * @param {IDevServerServeOptions} options
     * @returns {Http2SecureServer | undefined}
     */
    private getServerForOptions(options);
    /**
     * Sets the server that matches the given options
     * @param {Http2SecureServer} server
     * @param {IDevServerServeOptions} options
     */
    private setServerForOptions(server, options);
}
