Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NestApplicationContext

publicapi

Hierarchy

  • NestApplicationContext

Index

Constructors

constructor

  • Parameters

    • container: any
    • Default value scope: any[] = new Array()
    • Default value contextModule: any = null

    Returns NestApplicationContext

Accessors

instanceLinksHost

  • get instanceLinksHost(): InstanceLinksHost
  • Returns InstanceLinksHost

Methods

callBeforeShutdownHook

  • callBeforeShutdownHook(signal: any): Promise<void>
  • Calls the beforeApplicationShutdown function on the registered modules and children.

    Parameters

    • signal: any

    Returns Promise<void>

callBootstrapHook

  • callBootstrapHook(): Promise<void>
  • Calls the onApplicationBootstrap function on the registered modules and its children.

    Returns Promise<void>

callDestroyHook

  • callDestroyHook(): Promise<void>
  • Calls the onModuleDestroy function on the registered modules and its children.

    Returns Promise<void>

callInitHook

  • callInitHook(): Promise<void>
  • Calls the onModuleInit function on the registered modules and its children.

    Returns Promise<void>

callShutdownHook

  • callShutdownHook(signal: any): Promise<void>
  • Calls the onApplicationShutdown function on the registered modules and children.

    Parameters

    • signal: any

    Returns Promise<void>

close

  • close(): Promise<void>
  • Returns Promise<void>

dispose

  • dispose(): Promise<void>
  • Returns Promise<void>

enableShutdownHooks

  • enableShutdownHooks(signals?: any[]): this
  • Enables the usage of shutdown hooks. Will call the onApplicationShutdown function of a provider if the process receives a shutdown signal.

    Parameters

    • Default value signals: any[] = []

    Returns this

    The Nest application context instance

find

  • find(typeOrToken: any, contextModule: any): any
  • Parameters

    • typeOrToken: any
    • contextModule: any

    Returns any

get

  • get(typeOrToken: any, options?: { strict: boolean }): any
  • Parameters

    • typeOrToken: any
    • Default value options: { strict: boolean } = { strict: false }
      • strict: boolean

    Returns any

init

  • init(): Promise<this>
  • Initalizes the Nest application. Calls the Nest lifecycle events.

    Returns Promise<this>

    The NestApplicationContext instance as Promise

listenToShutdownSignals

  • listenToShutdownSignals(signals: string[]): void
  • Listens to shutdown signals by listening to process events

    Parameters

    • signals: string[]

      The system signals it should listen to

    Returns void

registerRequestByContextId

  • registerRequestByContextId(request: any, contextId: any): void
  • Parameters

    • request: any
    • contextId: any

    Returns void

resolve

  • resolve(typeOrToken: any, contextId?: ContextId, options?: { strict: boolean }): Promise<any>
  • Parameters

    • typeOrToken: any
    • Default value contextId: ContextId = helpers_1.createContextId()
    • Default value options: { strict: boolean } = { strict: false }
      • strict: boolean

    Returns Promise<any>

resolvePerContext

  • resolvePerContext(typeOrToken: any, contextModule: any, contextId: any, options: any): Promise<any>
  • Parameters

    • typeOrToken: any
    • contextModule: any
    • contextId: any
    • options: any

    Returns Promise<any>

select

  • Parameters

    • moduleType: any

    Returns NestApplicationContext

selectContextModule

  • selectContextModule(): void
  • Returns void

unsubscribeFromProcessSignals

  • unsubscribeFromProcessSignals(): void
  • Unsubscribes from shutdown signals (process events)

    Returns void

useLogger

  • useLogger(logger: any): void
  • Parameters

    • logger: any

    Returns void

Generated using TypeDoc