package com.anyun.im_lib.interf;
|
|
import com.anyun.im_lib.MsgDispatcher;
|
import com.anyun.im_lib.MsgTimeOutTimerManager;
|
import com.anyun.im_lib.listener.IMSConnectStatusCallback;
|
import com.anyun.im_lib.listener.OnEventListener;
|
|
import java.util.Vector;
|
|
/**
|
* MyApplication2
|
* Created by lzw on 2019/12/2. 11:58:51
|
* 邮箱:632393724@qq.com
|
* All Rights Saved! Chongqing AnYun Tech co. LTD
|
*/
|
public interface IMSClientInteface {
|
/**
|
* 初始化
|
* @param serverUrlList
|
* @param listener
|
* @param callback
|
*/
|
void init(Vector<String> serverUrlList, OnEventListener listener, IMSConnectStatusCallback callback);
|
|
/**
|
* 重置连接,也就是重连
|
* 首次连接也可认为是重连
|
*/
|
void resetConnect();
|
/**
|
* 重置连接,也就是重连
|
* 首次连接也可认为是重连
|
* 重载
|
* @param isFirst 是否首次连接
|
*/
|
void resetConnect(boolean isFirst);
|
|
/**
|
* 关闭连接,同时释放资源
|
*/
|
void close();
|
|
/**
|
* 表示ims是否已经关闭
|
* @return
|
*/
|
boolean isClosed();
|
|
/**
|
* 发送消息
|
* @param msg
|
*/
|
void sendMsg(byte[] msg);
|
|
/**
|
* 发送消息
|
* 重载
|
* @param msg
|
* @param isJoinTimeoutManager 是否加入超时管理器
|
*/
|
void sendMsg(byte[] msg, boolean isJoinTimeoutManager);
|
|
/**
|
* 获取重连间隔时长
|
* @return
|
*/
|
int getReconnectInterval();
|
|
|
/**
|
* 获取连间隔时长
|
* @return
|
*/
|
int getConnectTimeout();
|
/**
|
* 获取应用在前台时心跳间隔
|
* @return
|
*/
|
int getForegroundHeartbeatInterval();
|
|
/**
|
* 设置app前后台状态
|
* @param appStatus
|
*/
|
void setAppStatus(int appStatus);
|
|
/**
|
* 获取应用在后台时心跳间隔
|
* @return
|
*/
|
int getBackgroundHeartbeatInterval();
|
|
/**
|
* 获取应用层消息发送超时重发次数
|
* @return
|
*/
|
int getResendCount();
|
|
/**
|
* 获取应用层消息发送超时间隔
|
* @return
|
*/
|
int getResendInterval();
|
|
/**
|
* 获取消息转发器
|
* @return
|
*/
|
MsgDispatcher getMsgDispatcher();
|
|
MsgTimeOutTimerManager getMsgTimeOutTimerManager();
|
|
//获取注册消息
|
byte[] getRegisterMessage();
|
}
|