public final class IMBridger
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
IMBridger.IMModuleEventListener |
static interface |
IMBridger.IMQueryRemoteSessionListListener |
static interface |
IMBridger.IMQueryRemoteSessionMessageListener |
static interface |
IMBridger.IMQuerySessionListListener |
static interface |
IMBridger.IMQuerySessionMessageListener |
static interface |
IMBridger.IMReceiveMessageListener |
static class |
IMBridger.IMReportConnState |
static interface |
IMBridger.IMReportListener |
static class |
IMBridger.IMReportMessageState |
static class |
IMBridger.IMSendMessageContext |
static interface |
IMBridger.IMSendMessageListener |
static interface |
IMBridger.IMUploadLogFilterListener |
限定符和类型 | 字段和说明 |
---|---|
static int |
IM_AUTH_SUCCESSED |
static int |
IM_AUTH_TOKEN_EXPIRED |
static IMBridger.IMModuleEventListener |
mEventListener |
static IMBridger.IMUploadLogFilterListener |
mUploadLogFilterListener |
构造器和说明 |
---|
IMBridger() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.Object[] |
getLogHeaderInfo() |
static void |
onIMAuthCallback(int ecode,
int refreshType,
java.lang.String uid,
java.lang.String token,
long unReadPrivateMsg) |
static void |
onIMConnectCallback(boolean isConnected) |
static void |
onIMCreateChatroomCallback(int ecode,
int rcode,
java.lang.String fromID,
java.lang.String toID,
java.lang.Object context) |
static boolean |
onIMFilterReceiveMessage(int cmdtype,
int subtype,
int diytype,
int dataid,
java.lang.String fromid,
java.lang.String toid,
java.lang.String msgType,
byte[] msgContent,
int packetSize,
int waitLength,
int bufferSize) |
static void |
onIMJoinChatroomCallback(int ecode,
int rcode,
java.lang.String fromID,
java.lang.String toID,
java.lang.Object context) |
static void |
onIMLeaveChatroomCallback(int ecode,
int rcode,
java.lang.String fromID,
java.lang.String toID,
java.lang.Object context) |
static int |
onIMMessageReceived(int origin,
long dbid,
int cmdType,
int subType,
java.lang.String fromID,
java.lang.String toID,
byte[] msgContent,
byte[] extend1,
byte[] extend2,
byte[] extend3,
byte[] extend4,
byte[] extend5,
byte[] extend6,
long cmsgid,
long smsgid,
long sequence,
long ctime,
long stime,
int packetSize,
int waitLength,
int bufferSize) |
static void |
onIMSendHttpMessageCallback(int ecode,
int rcode,
int scode,
int hcode,
long cmsgid,
long smsgid,
long sequence,
long ctime,
long stime,
long hdelay,
long sdelay,
long qdelay,
byte[] content,
java.lang.Object context) |
static void |
onIMSendMessageCallback(int ecode,
int rcode,
java.lang.String fromID,
java.lang.String toID,
long cmsgid,
long smsgid,
long sequence,
long ctime,
long stime,
java.lang.Object context) |
static void |
reportConnectState(long timestamp,
long conntype,
long connstate,
long nettype,
long netchangecount,
long netchangedelay,
long netchangetype,
java.lang.String host,
java.lang.String dnsip,
long port,
long parse_delay,
long connect_delay,
long send_delay,
long recv_delay,
long full_delay,
long report_number,
java.lang.String localDns,
int wifiStrengths,
int mobileStrengths) |
static void |
reportMessageState(java.lang.String content) |
static void |
setChatroomReceiveMessageListener(IMBridger.IMReceiveMessageListener listener) |
static void |
setEventListener(IMBridger.IMModuleEventListener listener) |
static void |
setGlobalReceiveMessageListener(IMBridger.IMReceiveMessageListener listener) |
static void |
setReportListener(IMBridger.IMReportListener listener) |
static void |
setUploadLogFilterListener(IMBridger.IMUploadLogFilterListener listener) |
public static final int IM_AUTH_SUCCESSED
public static final int IM_AUTH_TOKEN_EXPIRED
public static IMBridger.IMModuleEventListener mEventListener
public static IMBridger.IMUploadLogFilterListener mUploadLogFilterListener
public static void setReportListener(IMBridger.IMReportListener listener)
public static void setEventListener(IMBridger.IMModuleEventListener listener)
public static void setGlobalReceiveMessageListener(IMBridger.IMReceiveMessageListener listener)
public static void setChatroomReceiveMessageListener(IMBridger.IMReceiveMessageListener listener)
public static void setUploadLogFilterListener(IMBridger.IMUploadLogFilterListener listener)
public static java.lang.Object[] getLogHeaderInfo()
public static void onIMCreateChatroomCallback(int ecode, int rcode, java.lang.String fromID, java.lang.String toID, java.lang.Object context)
ecode
- 错误码rcode
- 响应码fromID
- 发送者IDtoID
- 接收者IDcontext
- 自定义上下文public static void onIMJoinChatroomCallback(int ecode, int rcode, java.lang.String fromID, java.lang.String toID, java.lang.Object context)
ecode
- 错误码rcode
- 响应码fromID
- 发送者IDtoID
- 接收者IDcontext
- 自定义上下文public static void onIMLeaveChatroomCallback(int ecode, int rcode, java.lang.String fromID, java.lang.String toID, java.lang.Object context)
ecode
- 错误码rcode
- 响应码fromID
- 发送者IDtoID
- 接收者IDcontext
- 自定义上下文public static void onIMSendMessageCallback(int ecode, int rcode, java.lang.String fromID, java.lang.String toID, long cmsgid, long smsgid, long sequence, long ctime, long stime, java.lang.Object context)
ecode
- 错误码rcode
- 响应码fromID
- 发送者IDtoID
- 接收者IDcmsgid
- 客户端消息IDsmsgid
- 服务端消息ID(响应)sequence
- 服务端消息序列(响应)ctime
- 客户端时间戳stime
- 服务端时间戳(响应)context
- 自定义回调上下文public static void onIMSendHttpMessageCallback(int ecode, int rcode, int scode, int hcode, long cmsgid, long smsgid, long sequence, long ctime, long stime, long hdelay, long sdelay, long qdelay, byte[] content, java.lang.Object context)
ecode
- 本地错误码rcode
- 响应错误码scode
- 服务错误码hcode
- HTTP错误码cmsgid
- 客户端消息IDsmsgid
- 服务端消息IDsequence
- 消息序列号ctime
- 客户端时间戳stime
- 服务端时间戳hdelay
- HTTP请求耗时sdelay
- 服务端响应耗时qdelay
- 请求耗时content
- 响应内容context
- 自定义上下文public static boolean onIMFilterReceiveMessage(int cmdtype, int subtype, int diytype, int dataid, java.lang.String fromid, java.lang.String toid, java.lang.String msgType, byte[] msgContent, int packetSize, int waitLength, int bufferSize)
cmdtype
- 消息类型subtype
- 内容类型diytype
- 消息类型的CRC32dataid
- 数据ID(直播间ID的CRC32)fromid
- 发送者IDtoid
- 接收者ID(直播间ID)msgType
- 消息类型msgContent
- 消息内容packetSize
- 消息大小waitLength
- 缓冲中等待处理的字节数bufferSize
- 缓冲的大小public static int onIMMessageReceived(int origin, long dbid, int cmdType, int subType, java.lang.String fromID, java.lang.String toID, byte[] msgContent, byte[] extend1, byte[] extend2, byte[] extend3, byte[] extend4, byte[] extend5, byte[] extend6, long cmsgid, long smsgid, long sequence, long ctime, long stime, int packetSize, int waitLength, int bufferSize)
origin
- 数据来源dbid
- 数据库中的idcmdType
- 消息类型subType
- 内容类型fromID
- 发送者toID
- 接收者msgContent
- 消息内容extend1
- 扩展内容1(一般为msgType)extend2
- 扩展内容2extend3
- 扩展内容3extend4
- 扩展内容4(二进制)extend5
- 扩展内容5extend6
- 扩展内容6cmsgid
- 客户端消息IDsmsgid
- 服务端消息IDsequence
- 消息序列ctime
- 客户端时间戳stime
- 服务端时间戳public static void onIMConnectCallback(boolean isConnected)
isConnected
- public static void onIMAuthCallback(int ecode, int refreshType, java.lang.String uid, java.lang.String token, long unReadPrivateMsg)
ecode
- 错误代码refreshType
- 刷新类型uid
- 用户idtoken
- 认证unReadPrivateMsg
- 未读私信消息数量public static void reportConnectState(long timestamp, long conntype, long connstate, long nettype, long netchangecount, long netchangedelay, long netchangetype, java.lang.String host, java.lang.String dnsip, long port, long parse_delay, long connect_delay, long send_delay, long recv_delay, long full_delay, long report_number, java.lang.String localDns, int wifiStrengths, int mobileStrengths)
timestamp
- 过程开始时间戳(用户本地时间戳)conntype
- 连接类型(直播间/私信/群组...)connstate
- 连接状态(成功/失败/超时...)nettype
- 过程开始时的网络类型netchangecount
- 网络切换次数(从开始到结束,中间网络切换的次数)netchangedelay
- 第一次切换网络的延时(从开始连接到切换的延时)netchangetype
- 第一次切换的网络类型host
- 路由域名dnsip
- 路由地址(域名解析出来的第一个ip地址)port
- 路由端口parse_delay
- 域名解析耗时connect_delay
- 建立连接耗时send_delay
- 发送耗时(第一次发出数据的耗时)recv_delay
- 接收耗时(第一次接收到数据的耗时,从发送完毕到接收到数据返回的耗时)full_delay
- 整个过程耗时report_number
- 应用被杀死前的回报编号public static void reportMessageState(java.lang.String content)
content
- 状态值