UNPKG

@solid/community-server

Version:

Community Solid Server: an open and modular implementation of the Solid specifications

22 lines (21 loc) 1.17 kB
import { StaticHandler } from 'asynchronous-handlers'; import type { ActivityEmitter } from './ActivityEmitter'; import type { NotificationChannelStorage } from './NotificationChannelStorage'; import type { NotificationHandler } from './NotificationHandler'; /** * Listens to an {@link ActivityEmitter} and calls the stored {@link NotificationHandler}s in case of an event * for every matching notification channel found. * * Takes the `rate` feature into account so only channels that want a new notification will receive one. * * Extends {@link StaticHandler} so it can be more easily injected into a Components.js configuration. * No class takes this one as input, so to make sure Components.js instantiates it, * it needs to be added somewhere where its presence has no impact, such as the list of initializers. */ export declare class ListeningActivityHandler extends StaticHandler { protected readonly logger: import("global-logger-factory").Logger<unknown>; private readonly storage; private readonly handler; constructor(storage: NotificationChannelStorage, emitter: ActivityEmitter, handler: NotificationHandler); private emit; }