import * as log from 'loglevel';
import Connection from './services/Connection';
import { BaseMessage } from './base/BaseMessage';
import { BroadcastParams, ISessionOptions, SubscribeParams } from './util/interfaces';
import { Ping } from './base/Uas';
export default abstract class BaseSession {
    options: ISessionOptions;
    uuid: string;
    sessionid: string;
    subscriptions: {
        [channel: string]: any;
    };
    nodeid: string;
    master_nodeid: string;
    expiresAt: number;
    signature: string;
    relayProtocol: string;
    contexts: string[];
    timeoutErrorCode: number;
    protected connection: Connection;
    protected _jwtAuth: boolean;
    protected _doKeepAlive: boolean;
    protected _keepAliveTimeout: any;
    protected _reconnectTimeout: any;
    protected _autoReconnect: boolean;
    protected _idle: boolean;
    protected Ping: Ping;
    private _executeQueue;
    private _pong;
    private _failCount;
    constructor(options: ISessionOptions);
    get __logger(): log.Logger;
    get connected(): boolean;
    get expired(): boolean;
    get reconnectDelay(): number;
    execute(msg: BaseMessage): any;
    filterExecuteQueue(v: any): void;
    executeRaw(text: string): void;
    validateOptions(): boolean;
    broadcast(params: BroadcastParams): void;
    subscribe(params: SubscribeParams): void;
    unsubscribe({ channels }: SubscribeParams): void;
    disconnect(): Promise<void>;
    on(eventName: string, callback: Function): this;
    off(eventName: string, callback?: Function): this;
    _refreshToken(): Promise<void>;
    connect(): Promise<void>;
    protected _handleLoginError(error: any): void;
    protected _onSocketOpen(e: any): Promise<void>;
    protected _onSocketCloseOrError(event: any): void;
    protected _onSocketMessage(msg: any): void;
    protected _removeSubscription(protocol: string, channel?: string): void;
    protected _addSubscription(protocol: string, handler: Function, channel: string): void;
    _existsSubscription(protocol: string, channel?: string): boolean;
    private _attachListeners;
    private _detachListeners;
    private _emptyExecuteQueues;
    private _closeConnection;
    private _checkTokenExpiration;
    private _keepAlive;
    static on(eventName: string, callback: any): void;
    static off(eventName: string): void;
    static uuid(): string;
}
