import type { IMessage, IMessageConfirmation, IMessageSender, OcppRequest, OcppResponse } from '@citrineos/base'; import { AbstractMessageSender, MessageState, OcppError } from '@citrineos/base'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; import { RabbitMQChannelManager } from './ChannelManager.js'; import { RabbitMQConnectionManager } from './ConnectionManager.js'; /** * Implementation of a {@link IMessageSender} using RabbitMQ as the underlying transport. */ export declare class RabbitMqSender extends AbstractMessageSender implements IMessageSender { private exchange; /** * Constants */ private static readonly CHANNEL_ID; /** * Fields */ protected _connectionManager: RabbitMQConnectionManager; protected _channelManager: RabbitMQChannelManager; /** * Constructor for the class. * * @param {Logger} [logger] - The logger object. */ constructor(exchange: string, connectionManager: RabbitMQConnectionManager, channelManager: RabbitMQChannelManager, logger?: Logger); /** * Methods */ /** * Sends a request message with an optional payload and returns a promise that resolves to the confirmation message. * * @param {IMessage} message - The message to be sent. * @param {OcppRequest | undefined} payload - The optional payload to be sent with the message. * @return {Promise} A promise that resolves to the confirmation message. */ sendRequest(message: IMessage, payload?: OcppRequest | undefined): Promise; /** * Sends a response message and returns a promise of the message confirmation. * * @param {IMessage} message - The message to send. * @param {OcppResponse | OcppError} payload - The payload to include in the response. * @return {Promise} - A promise that resolves to the message confirmation. */ sendResponse(message: IMessage, payload?: OcppResponse | OcppError): Promise; /** * Sends a message and returns a promise that resolves to a message confirmation. * * @param {IMessage} message - The message to be sent. * @param {OcppRequest | OcppResponse | OcppError} [payload] - The payload to be included in the message. * @param {MessageState} [state] - The state of the message. * @return {Promise} - A promise that resolves to a message confirmation. */ send(message: IMessage, payload?: OcppRequest | OcppResponse | OcppError, state?: MessageState): Promise; /** * Shuts down the sender by closing the client. * * @return {Promise} A promise that resolves when the client is closed. */ shutdown(): Promise; }