rokot-notification
Version:
Rokot - [Rocketmakers](http://www.rocketmakers.com/) TypeScript NodeJs Platform
18 lines (17 loc) • 862 B
TypeScript
import * as Logger from "bunyan";
import { INotification, INotificationDispatchResult, INotificationDispatchHandler, INotificationHandlerConstructor } from "./core";
export interface INotificationDispatcher {
dispatch(notification: INotification): Promise<INotificationDispatchResult[]>;
shutdown(): void;
}
export declare class NotificationDispatcher implements INotificationDispatcher {
private logger;
dispatchHandlers: INotificationDispatchHandler[];
private handlerClassConstructor?;
constructor(logger: Logger, dispatchHandlers: INotificationDispatchHandler[], handlerClassConstructor?: INotificationHandlerConstructor);
dispatch(notification: INotification): Promise<INotificationDispatchResult[]>;
shutdown(): void;
private validateMessageCore;
private findMessageHandlerDecoration;
private validateMessage;
}