///
import * as Component from '../Component';
import * as CommandBus from '../CommandBus';
import { Command } from '../Command';
import * as amqp from 'amqplib';
export declare type commandHandler = (command: Command) => Promise;
export declare type ConcurencyError = CommandBus.ConcurencyError;
export interface Listener {
queue: string;
handler: commandHandler;
}
export interface props extends Component.props {
AMQP: Config;
}
export interface Config {
url?: string;
channel?: amqp.Options.AssertQueue;
publish?: amqp.Options.Publish;
prefetch?: number;
}
export declare class Transport extends Component.Component implements CommandBus.Transport {
protected config: Config;
protected amqp: amqp.Connection;
protected lastConnection: number;
protected connectFlag: NodeJS.Timer;
protected listeners: Array;
protected channels: Map>;
constructor(props: props);
start(): Promise;
protected connect(): Promise;
listen(queue: string, handler: commandHandler): Promise;
protected bind(queue: string, handler: commandHandler): Promise;
protected getChannel(queue: string): Promise;
send(command: Command): Promise;
protected reconnect(): Promise;
protected unbind(queue: string, handler: commandHandler): Promise;
protected disconnect(): Promise;
stop(): Promise;
}