import { IChronicler } from './chronicler'; import { IChroniclerDescription, IChroniclerFactory, IChroniclerProvider, IDataEmitter, IEmitterDescription, IEmitterFactory, IEmitterProvider, IFormatSettings } from './dataEmitter'; import { LoggerFacade } from './loggerFacade'; /** * Central provider for emitters and chroniclers, factories are registered * here with a coressponding type string which is used in the top level build * method to route to the correct factory. Does not support registering * multiple factories with the same type string, last registered takes priority. */ declare class Provider implements IChroniclerProvider, IEmitterProvider { private readonly _emitterFactories; private readonly _chroncilerFactories; private logger?; /** * * @param {string} type * @param {IEmitterFactory} factory */ registerEmitterFactory(type: string, factory: IEmitterFactory): void; /** * * @param {EmitterDescription} description * @return {Promise} */ buildEmitter(description: IEmitterDescription): Promise; /** * * @param {string} base64StateData * @param {IFormatSettings} formatSettings * @return {Promise} */ recreateEmitter(base64StateData: string, formatSettings: IFormatSettings): Promise; /** * * @param {string} stateData if encrypted, base64 encoded cipher text, otherwise a json string * @param {IFormatSettings} formatSettings the format settings describing the state data is encrypted * and if so what cipher type etc. * @return {IChronicler} */ recreateChronicler(stateData: string, formatSettings: IFormatSettings): Promise; /** * * @param {string} type * @param {IChroniclerFactory} factory */ registerChroniclerFactory(type: string, factory: IChroniclerFactory): void; /** * * @param {IChroniclerDescription} description * @return {Promise} */ buildChronicler(description: IChroniclerDescription): Promise; /** * * @param {string} type */ removeChroniclerFactory(type: string): void; /** * * @param {string} type * @return {boolean} */ hasChroniclerFactory(type: string): boolean; /** * * @return {Array} */ getChroniclerFactoryTypes(): string[]; /** * * @param {string} type */ removeEmitterFactory(type: string): void; /** * * @param {string} type * @return {boolean} */ hasEmitterFactory(type: string): boolean; /** * * @return {Array} */ getEmitterFactoryTypes(): string[]; /** * * @param {LoggerFacade} loggerFacade */ setLoggerFacade(loggerFacade: LoggerFacade): void; } /** * Get the provider instance */ export declare class ProviderSingleton { private constructor(); /** * * @return {Provider} */ static getInstance(): Provider; } export {};