import { SocketAction, SocketActionHandler } from "./socket-contracts";
export declare class MemoryQueue {
    readonly topic: string;
    constructor(topic: string);
    private readonly listeners;
    private readonly messages;
    addListener(handler: SocketActionHandler): void;
    /** Queues the given message and raises `newMessage` in the listeners.  */
    push(msg: SocketAction): void;
    /** triggers each listener for whatever is in the queue until it is empty. */
    raise(): void;
}
/** Lightweight, single use custodian of subscribeable message queues. */
export declare class QueueManager {
    constructor();
    push(msg: SocketAction, topic: string): void;
    subscribeTo(topic: string, handler: SocketActionHandler): void;
    /** Creates a queue for the given message topic (Idempotent). */
    getsertQueue(topic: string): MemoryQueue;
    private queues;
}
