UNPKG

@allgemein/eventbus

Version:
32 lines (31 loc) 1.12 kB
import { EventChannel } from './EventChannel'; import { EventBusConfiguration } from './EventBusConfiguration'; import { IEventBusConfiguration } from './IEventBusConfiguration'; export declare class EventBus { constructor(); static get namespaces(): string[]; private static self; private configurations; private readonly nodeId; private inc; private channels; static $(): EventBus; static register(o: any): Promise<void>; static unregister(o: any): Promise<void>; private static postOnChannel; static post(o: any, options?: any): Promise<any[]>; static postAndForget(o: any, options?: any): Promise<any>; /** * cls must inherit the AbstractEventBusAdapter class * * @param cls * @param name */ static registerAdapter(cls: Function, name?: string): void; static unregisterAdapter(name_or_cls: Function | string): void; addConfiguration(cfg: IEventBusConfiguration): EventBusConfiguration; private getConfiguration; getChannel(name: string): EventChannel; private getOrCreateChannel; shutdown(): Promise<void>; }