/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { PeerAddress } from "#peer/PeerAddress.js"; import { Session } from "#session/Session.js"; import { SessionManager } from "#session/SessionManager.js"; import { ChannelType, Diagnostic, Entropy, Environment, Environmental, Lifetime, Transport, TransportSet } from "@matter/general"; import { MessageExchange } from "./MessageExchange.js"; import { ProtocolHandler } from "./ProtocolHandler.js"; /** * Interfaces {@link ExchangeManager} with other components. */ export interface ExchangeManagerContext { lifetime: Lifetime.Owner; /** * Where this manager's log messages come from, so a destination can attribute the ones it emits from a transport * callback, which carries no call stack of its own. */ origin?: Diagnostic.Origin; entropy: Entropy; transports: TransportSet; sessions: SessionManager; } export declare class ExchangeManager implements Transport.Provider { #private; constructor(context: ExchangeManagerContext); static [Environmental.create](env: Environment): ExchangeManager; hasProtocolHandler(protocolId: number): boolean; getProtocolHandler(protocolId: number): ProtocolHandler | undefined; addProtocolHandler(protocol: ProtocolHandler): void; interfaceFor(type: ChannelType, address?: string): Transport | undefined; hasInterfaceFor(type: ChannelType, address?: string): boolean; initiateExchange(address: PeerAddress, protocolId: number, options?: MessageExchange.Options): MessageExchange; initiateExchangeForSession(session: Session, protocolId: number, options?: MessageExchange.Options): MessageExchange; close(): Promise; deleteExchange(exchangeIndex: number): void; calculateMaximumPeerResponseTimeMsFor(session: Session, expectedProcessingTime?: import("@matter/general").Duration, includeMaximumSendingTime?: boolean): import("@matter/general").Duration; } export declare class ExchangeCounter { #private; constructor(entropy: Entropy); getIncrementedCounter(): number; } //# sourceMappingURL=ExchangeManager.d.ts.map