Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILifecycle

Hierarchy

  • ILifecycle

Implemented by

Indexable

[id: string]: any

Index

Methods

Methods

Optional start

  • start(): Promise<boolean>
  • Starts component. Defined as async method to simplify internal use of await for starting any child/sub-components. Usually called by System.start which synchronously starts all of its components in dependency order.

    Returns false to indicate component startup failed and to cancel initialization of dependent components. Alternatively, an error can be thrown, but it's the user's responsibility to catch it.

    Returns Promise<boolean>

Optional stop

  • stop(): Promise<boolean>
  • Similar to ILifecycle.start but for stopping components.

    Returns false to indicate component startup failed and log a warning message to the console. Unlike with start(), returning false will NOT stop decommision other components.

    Returns Promise<boolean>

Generated using TypeDoc