import { Logger } from "../../util/Logger.js"; import { FunctionQueue } from "./FunctionQueue.js"; /** * Controls the flow of subscription-related (subscribe, resubscribe, unsubscribe) commands * @param commandQueue the queue to hold commands to process. */ export declare class SubscriptionCommandSender { static CommandModes: any; static HTTP_STATUS_ACCEPTED: number; static HTTP_STATUS_TOO_MANY_REQUESTS: number; maxTimeInterval: number; _logger: Logger; stopping: boolean; timerObject: any; tokenManager: any; commandQueue: FunctionQueue; constructor(commandQueue: FunctionQueue, tokenManager: any); private _clamp; private getTokenCount; private isBucketFull; private registerToTokenAvailabilityListener; private restartTimer; private stopTimer; private signalStop; private getRetryDelay; private scheduleRetry; private onResponse; private getNewRetryDelay; private onTimer; private addItemToQueue; private enqueueSubscribe; private enqueueUnsubscribe; private isRetriable; private processQueue; /** * Adds a request to subscribe to the specified channel. * @param channel the channel to subscribe * @returns true if accepted; false if there's insufficient room */ subscribeToChannel(channel: any): boolean; /** * Adds a request to unsubscribe to the specified channel. * @param channel the channel to unsubscribe * @returns true if accepted; false if there's insufficient room */ unsubscribeToChannel(channel: any): boolean; /** * Signals this instance to stop. */ stop(): void; /** * Whether this instance is stopped or stopping. * @returns true if stopped or stopping; otherwise false. */ isStopping(): boolean; getQueue(): FunctionQueue; isBucketEmpty(): boolean; getTimerObject(): any; getTokenCountFromTokenManager(): any; }