import { CustomServerCallback } from '@ioc:Adonis/Core/TestUtils';
import { AppKernel } from '../Kernel';
/**
 * Exposes the API to setup the application for starting the HTTP
 * server.
 *
 * - Calling "kill" explicitly exists the process.
 * - The "error" event emitted on the server instance explicitly exists the process.
 * - SIGINT and in some case SIGTERM explicitly exists the process.
 */
export declare class HttpServer {
    private appRoot;
    /**
     * Reference to the HTTP server.
     */
    private server;
    /**
     * Reference to the app kernel
     */
    kernel: AppKernel;
    application: import("@adonisjs/application").Application;
    constructor(appRoot: string);
    /**
     * Closes the underlying HTTP server
     */
    private closeHttpServer;
    /**
     * Monitors the HTTP server for close and error events, so that
     * we can perform a graceful shutdown.
     */
    private monitorHttpServer;
    /**
     * Creates the HTTP server to handle incoming requests. The server is just
     * created but not listening on any port.
     */
    createServer(serverCallback?: CustomServerCallback): void;
    /**
     * Starts the http server a given host and port
     */
    listen(): Promise<void>;
    /**
     * Start the HTTP server by wiring up the application
     */
    start(serverCallback?: CustomServerCallback): Promise<void>;
    /**
     * Prepares the application for shutdown. This method will invoke `shutdown`
     * lifecycle method on the providers and closes the `httpServer`.
     */
    close(): Promise<void>;
    /**
     * Kills the http server process by attempting to perform a graceful
     * shutdown or killing the app forcefully as waiting for configured
     * seconds.
     */
    kill(waitTimeout?: number): Promise<void>;
}
