被 com.juphoon.cloud.JCCallImpl, com.juphoon.cloud.JCMediaChannelImpl, com.juphoon.cloud.JCMediaDeviceImpl , 以及 com.juphoon.cloud.JCPushImpl 继承.
Public 成员函数 | |
void | onLogin (boolean result, @JCClient.ClientReason int reason) |
void | onLogout (@JCClient.ClientReason int reason) |
void | onClientStateChange (@JCClient.ClientState int state, @JCClient.ClientState int oldState) |
void | onOnlineMessageSendResult (int operationId, boolean result) |
void | onOnlineMessageReceive (String userId, String content) |
详细描述
JCClientCallback 回调,用于回调登录相关事件
成员函数说明
◆ onLogin()
void com.juphoon.cloud.JCClientCallback.onLogin | ( | boolean | result, |
@JCClient.ClientReason int | reason | ||
) |
登录结果回调
在调用 login 方法成功后会收到此回调
- 参数
-
result 登录是否成功 - true:登录成功
- false:登录失败
reason 登录失败原因,当 result 为 false 时该值有效。参见:JCClient 错误码
◆ onLogout()
void com.juphoon.cloud.JCClientCallback.onLogout | ( | @JCClient.ClientReason int | reason | ) |
◆ onClientStateChange()
void com.juphoon.cloud.JCClientCallback.onClientStateChange | ( | @JCClient.ClientState int | state, |
@JCClient.ClientState int | oldState | ||
) |
登录状态变化回调
在用户的登录状态发生改变时会收到此回调,登录状态:
- STATE_NOT_INIT: 未初始化
- STATE_IDLE: 未登录
- STATE_LOGINING: 登录中
- STATE_LOGINED: 登录成功
- STATE_LOGOUTING: 登出中
- 参数
-
state 当前状态值 oldState 之前状态值
◆ onOnlineMessageSendResult()
void com.juphoon.cloud.JCClientCallback.onOnlineMessageSendResult | ( | int | operationId, |
boolean | result | ||
) |
在线消息发送结果
- 参数
-
operationId 操作id, 由 sendOnlineMessage 返回 result 消息发送是否成功
◆ onOnlineMessageReceive()
void com.juphoon.cloud.JCClientCallback.onOnlineMessageReceive | ( | String | userId, |
String | content | ||
) |
收到在线消息
- 参数
-
userId 消息发送方用户标识 content 消息内容
该接口的文档由以下文件生成:
- cloud/src/main/common/com/juphoon/cloud/JCClientCallback.java