import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; import type { IMessage } from './message.js'; import type { IMessageHandler } from './message-handler.js'; import { type OcppRequest, type OcppResponse, type CallAction, type HandlerProperties } from '@citrineos/types'; import { OcppError } from '../../ocpp/rpc/message.js'; import type { IModule } from '../modules/module.js'; /** * Abstract class implementing {@link IMessageHandler}. */ export declare abstract class AbstractMessageHandler implements IMessageHandler { /** * Fields */ protected _module?: IModule; protected _logger: Logger; /** * Constructor * * @param config The system configuration. * @param logger [Optional] The logger to use. */ constructor(logger?: Logger, module?: IModule); /** * Getter & Setter */ get module(): IModule | undefined; set module(value: IModule | undefined); /** * Methods */ handle(message: IMessage, props?: HandlerProperties): Promise; /** * Abstract Methods */ abstract subscribe(identifier: string, actions?: CallAction[], filter?: { [k: string]: string; }): Promise; abstract unsubscribe(identifier: string): Promise; abstract shutdown(): Promise; }