Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractHostedInstanceManager Abstract

Hierarchy

Implements

Index

Constructors

Properties

hostedInstanceProcess: ChildProcess
hostedPluginProcess: HostedPluginProcess
hostedPluginSupport: HostedPluginSupport
instanceOptions: Omit<RequestOptions, "url">
instanceUri: URI
isPluginRunning: boolean = false
metadata: MetadataScanner
pluginUri: URI
request: RequestService

Methods

  • checkInstanceUriReady(): Promise<void>
  • getInstanceURI(): URI
  • getPluginURI(): URI
  • isPluginValid(uri: URI): boolean
  • isPortFree(port: number): Promise<boolean>
  • isRunning(): boolean
  • ping(): Promise<boolean>
  • pingLoop(remainingCount: number, resolve: ((value?: void | PromiseLike<void> | Error) => void), reject: ((value?: void | PromiseLike<void> | Error) => void)): Promise<void>
  • Start a loop to ping, if ping is OK return immediately, else start a new ping after 1second. We iterate for the given amount of loops provided in remainingCount

    Parameters

    • remainingCount: number

      the number of occurrence to check

    • resolve: ((value?: void | PromiseLike<void> | Error) => void)

      resolve function if ok

        • (value?: void | PromiseLike<void> | Error): void
        • Parameters

          • Optional value: void | PromiseLike<void> | Error

          Returns void

    • reject: ((value?: void | PromiseLike<void> | Error) => void)

      reject function if error

        • (value?: void | PromiseLike<void> | Error): void
        • Parameters

          • Optional value: void | PromiseLike<void> | Error

          Returns void

    Returns Promise<void>

  • postProcessInstanceOptions(options: Omit<RequestOptions, "url">): Promise<Omit<RequestOptions, "url">>
  • postProcessInstanceUri(uri: URI): Promise<URI>
  • run(pluginUri: URI, port?: number): Promise<URI>
  • runHostedPluginTheiaInstance(command: string[], options: SpawnOptions): Promise<URI>
  • terminate(): void
  • validatePort(port: number): Promise<void>