import { Routable, RoutableConstructOptions } from './routable'; import { Application as ExpressApplication } from 'express'; import { Logger } from 'log4js'; import { ErrorMode } from './constants'; import { Service } from './service'; import { ServiceProvider } from '../provider/provider'; import { Worker } from "../provider/worker"; import { Executor, ServiceExecutorExecuteOptions } from "../provider/executor"; import { Schedule } from "./schedule"; import { Job, JobId } from "bull"; interface ApplicationConstructOptions extends RoutableConstructOptions { config: object; } interface ApplicationLoggers { info: Logger; error: Logger; access: Logger; } interface ServiceWorkerOptions { name: string; provider: ServiceProvider; services: Service[]; } interface ServiceProviders { workers: ServiceWorkerOptions[]; } interface ProvidedServiceInfo { service: Service, executor: Executor } export declare abstract class Application extends Routable { constructor(options: ApplicationConstructOptions); readonly name: string; base: string; readonly config: object; readonly expressApp: ExpressApplication; errorMode: ErrorMode; listen(port: number, hostname: string, backlog: number, callback?: Function): Application; listen(port: number, hostname: string, callback?: Function): Application; listen(port: number, callback?: Function): Application; listen(path: string, callback?: Function): Application; listen(handle: any, listeningListener?: Function): Application; set(key: string, value: string): void; getWorker(name: string): Worker; getExecutor(name: string): Executor; prepare(): Promise; abstract createRouter(): Promise; provideServices(): ServiceProviders; registerSchedules(): Schedule[]; initializeProvideServices(): Promise; invokeService(serviceName: string, data: any, options: ServiceExecutorExecuteOptions): any; getServiceJob(serviceName: string, jobId: JobId): Promise; initializeSchedules(): void; loggers: ApplicationLoggers; private _name: string; private _base: string; private _config: object; private _instance: ExpressApplication; private _serviceWorkers: Map; private _serviceExecutors: Map; private _providedServices: Map; }