Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bootstrap

Bootstrap controls the stages of application startup. From configuration to full startup for passed command.

Stages:

  • set configuration file load order
  • load configuration from config files
  • TODO: first schema validation?
  • get modules list (paths are passed through initial configuration)
  • load config.schema.json or config.schema.js or maybe passed through Activator?
  • TODO: extend config schema for validation
  • validate current given configuration, if fails abort startup, else proceed to next stage
  • initialise Activator's for specific lib startup or other modul specific initialisations

Hierarchy

  • Bootstrap

Index

Constructors

Private constructor

Properties

Private VERBOSE_DONE

VERBOSE_DONE: boolean = false

Private activators

activators: IActivator[] = null

Private bootstraps

bootstraps: IBootstrap[] = null

Private configLoader

configLoader: ConfigLoader

Private nodeId

nodeId: string = ...

Private running

running: boolean = false

Private runtimeLoader

runtimeLoader: IRuntimeLoader = null

Private storage

storage: Storage

Static Private $self

$self: Bootstrap = null

Methods

activateErrorHandling

activateLogger

activateStorage

Private addShutdownEvents

  • addShutdownEvents(): void

configure

Private createActivatorInstances

Private createBootstrapInstances

Private createSystemInfo

execCommand

  • execCommand(clazz: Function, argv: any): Promise<any>

getActivators

getAppPath

  • getAppPath(): any

getCommands

  • getCommands(withInject?: boolean): ICommand[]

getConfigLoader

  • getConfigLoader(): ConfigLoader

getConfiguration

getLoader

getModulBootstraps

getModules

getNodeId

  • getNodeId(): string

getStorage

prepareRuntime

shutdown

  • shutdown(exitCode?: number): Promise<void>

startup

throwedUncaughtException

  • throwedUncaughtException(err: Error): Promise<void>

throwedUnhandledRejection

  • throwedUnhandledRejection(reason: any, err: Error): Promise<void>

Static _

Static addConfigOptions

  • addConfigOptions(options: IOptions): IOptions

Static configure

Static getContainer

Static getNodeId

  • getNodeId(): string

Static prepareInvoker

Static reset

  • reset(): void

Static setConfigSources

Static verbose

  • verbose(c: any): void

Generated using TypeDoc