Aller au contenu principal
Version: Next

Framework

Hierarchy

Index

Constructors

constructor

  • new Framework(applicationContext: IMidwayContainer): CronFramework

Properties

app

readonlyapplicationContext

applicationContext: IMidwayContainer

configService

configService: MidwayConfigService

configurationOptions

configurationOptions: any

environmentService

environmentService: MidwayEnvironmentService

informationService

informationService: MidwayInformationService

loggerService

loggerService: MidwayLoggerService

middlewareService

middlewareService: MidwayMiddlewareService<Context, unknown, unknown>

mockService

mockService: MidwayMockService

Methods

publicaddJob

  • addJob(name: JobNameOrClz, jobOptions?: Partial<CronJobParameters>): CronJob

applicationInitialize

  • applicationInitialize(options: IMidwayBootstrapOptions): Promise<void>

applyMiddleware

  • applyMiddleware<R, N>(lastMiddleware?: CommonMiddlewareUnion<Context, R, N>): Promise<MiddlewareRespond<Context, R, N>>
  • Type parameters

    • R
    • N

configure

  • configure(): any

createLogger

  • createLogger(name: string, option?: MidwayLoggerOptions): any

publicdeleteJob

getAppDir

  • getAppDir(): string

getApplication

getApplicationContext

  • getApplicationContext(): IMidwayContainer

getBaseDir

  • getBaseDir(): string

getConfiguration

  • getConfiguration(key?: string): any

getCoreLogger

  • getCoreLogger(): ILogger

getCurrentEnvironment

  • getCurrentEnvironment(): string

getFrameworkName

  • getFrameworkName(): string

publicgetJob

getLogger

  • getLogger(name?: string): any

getMiddleware

  • getMiddleware(): ContextMiddlewareManager<Context, unknown, unknown>

getNamespace

  • getNamespace(): string

getProjectName

  • getProjectName(): string

init

initialize

  • initialize(options?: IMidwayBootstrapOptions): Promise<void>

isEnable

  • isEnable(): boolean

publicloadConfig

  • loadConfig(): void

run

  • run(): Promise<void>

runGuard

  • runGuard(ctx: Context, supplierClz: new (...args: any[]) => any, methodName: string): Promise<boolean>

setNamespace

  • setNamespace(namespace: string): void

stop

  • stop(): Promise<void>

useFilter

  • useFilter(filter: CommonFilterUnion<Context, unknown, unknown>): void

useGuard

  • useGuard(guards: CommonGuardUnion<Context>): void

useMiddleware

  • useMiddleware(middleware: CommonMiddlewareUnion<Context, unknown, unknown>): void