export interface WSMessageHandler {
    /**
     * Websocket端连接成功事件响应
     * @param sessionId socket会话ID
     * @param context 客户端连接时所有参数
     */
    onConnected(sessionId: string, context: any): Promise<any>;
    /**
     * Websocket端连接关闭事件响应
     * @param sessionId socket会话ID
     * @param context 客户端连接时所有参数
     */
    onClosed(sessionId: string, context: any): Promise<any>;
    /**
     * 响应接收到服务端发送的[PrintKafkaLogDown]类型消息
     * @param data 消息内容
     */
    onMsgPrintKafkaLogDown(data: any, sessionId: string, context: any): Promise<any>;
    /**
     * 响应接收到服务端发送的其他消息
     * @param msg 消息内容
     */
    onOtherMsg(msg: any, sessionId: string, context: any): Promise<any>;
}
export declare class WSServiceBase {
    sessionId: string;
    context: any;
    ws: any;
    protected messageHandler: WSMessageHandler;
    private wsTimeoutObj;
    /**
     * 连接成功事件响应
     * @param event
     */
    onopen(event: any): Promise<void>;
    /**
     * 定时发送心跳消息
     */
    private startWsPing;
    /**
     * 接收到新消息响应
     * @param event
     */
    onmessage(event: any): Promise<void>;
    /**
     * 连接关闭事件响应
     * @param event
     */
    onclose(event: any): Promise<void>;
    private parseJSON;
    /**
     * 发送[PrintKafkaLogUp]类型消息至服务端
     * @param data 消息内容
     */
    sendMsgPrintKafkaLogUp(data: any): Promise<void>;
    /**
     * 发送消息至服务端
     * @param msg 消息体
     */
    sendMsg(msg: any): Promise<void>;
}
