public interface ImSessionCallback
该接口主要用于在会话管理控制时的相关业务控制和业务嵌入,比如获取身份认证和身份认证状态检查的业务控制
Session management control callback interface class
This interface is mainly used for related service control and service embedding during session management control, such as obtaining service control for identity authentication and identity authentication status check
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
doAuthentication(ImSession imSession,
ImRequest imRequest)
执行身份认证的业务回调
当配置会话状态需要身份认证后且未具备身份认证时,才会执行此回调
Business callback for identity authentication
This callback is executed when the configuration session state requires authentication and does not have authentication.
|
boolean |
isAuthentication(ImSession imSession,
ImRequest imRequest)
确定是否具备身份认证的业务回调
当配置会话状态需要身份认证后,才会执行此回调
Determine if there is a business callback with authentication
This callback is only executed when the session state needs to be authenticated.
|
void |
onError(ImSession imSession,
ImRequest imRequest,
Throwable throwable)
执行时发生错误的回调
仅在异步时才会执行
An error callback occurred during execution
Executed only when asynchronous
|
boolean isAuthentication(ImSession imSession, ImRequest imRequest)
当配置会话状态需要身份认证后,才会执行此回调
Determine if there is a business callback with authentication
This callback is only executed when the session state needs to be authenticated.
imSession - ImSession会话状态控制对象 imRequest - ImResponse会话响应对象 boolean doAuthentication(ImSession imSession, ImRequest imRequest)
当配置会话状态需要身份认证后且未具备身份认证时,才会执行此回调
Business callback for identity authentication
This callback is executed when the configuration session state requires authentication and does not have authentication.
imSession - ImSession会话状态控制对象 imRequest - ImResponse会话响应对象 void onError(ImSession imSession, ImRequest imRequest, Throwable throwable)
仅在异步时才会执行
An error callback occurred during execution
Executed only when asynchronous
imSession - ImSession会话状态控制对象 imRequest - ImRequest会话请求数据 throwable - 错误/异常数据 Copyright © 2021. All rights reserved.