import { EventMessage } from '../../constants'; import { ListenerRegistry } from '../../listen/listener-registry'; import { DeepstreamConfig, DeepstreamServices, SocketWrapper, Handler, SubscriptionRegistry } from '@deepstream/types'; export default class EventHandler implements Handler { private services; private subscriptionRegistry; private listenerRegistry; /** * Handles incoming and outgoing messages for the EVENT topic. */ constructor(config: DeepstreamConfig, services: DeepstreamServices, subscriptionRegistry?: SubscriptionRegistry, listenerRegistry?: ListenerRegistry); close(): Promise; /** * The main distribution method. Routes messages to functions * based on the provided action parameter of the message */ handle(socketWrapper: SocketWrapper | null, message: EventMessage): void; /** * Notifies subscribers of events. This method is invoked for the EVENT action. It can * be triggered by messages coming in from both clients and the message connector. */ triggerEvent(socket: SocketWrapper | null, message: EventMessage): void; }