Theia API Documentation v1.72.1
    Preparing search index...

    The main entry point for Theia applications.

    Index

    Constructors

    Properties

    app: Application = ...
    processUtils: ProcessUtils
    rootContainer: Container
    stopwatch: Stopwatch

    Accessors

    Methods

    • Performs an asynchronous shutdown of the backend in two phases:

      1. Contributions' onStop hooks are dispatched in parallel and awaited so that they can still resolve services from the root Inversify container while it is bound.
      2. All services in the root container are unbound, running their @preDestroy hooks.

      Each phase has its own SHUTDOWN_TIMEOUT_MS budget to avoid hanging on a misbehaving hook. Late-resolving promises from a timed-out phase may still settle in the background and could log noisily or interact with a partly unbound container; this is accepted because the process is exiting.

      Idempotent: a second invocation is a no-op. Exits the process with code 1 so that the process.on('exit') handler runs for fallback cleanup such as ProcessUtils.terminateProcessTree; the exit handler does not re-invoke contribution onStop() hooks that this method already dispatched.

      Returns Promise<void>

    • Parameters

      • contentType: string
      • req: Request
      • res: Response
      • next: NextFunction

      Returns Promise<void>

    • Parameters

      • Optionalport: number
      • Optionalhostname: string

      Returns Promise<
          | Server<typeof IncomingMessage, typeof ServerResponse>
          | Server<typeof IncomingMessage, typeof ServerResponse>,
      >