NIMSDK-AOS
9.17.0
basesdk
src
com
netease
nimlib
sdk
RequestCallbackWrapper.java
浏览该文件的文档.
1
package
com.netease.nimlib.sdk;
2
10
public
abstract
class
RequestCallbackWrapper
<T>
implements
RequestCallback
<T> {
11
18
public
abstract
void
onResult
(
int
code, T result, Throwable exception);
19
20
@Override
21
public
void
onSuccess
(T result) {
22
onResult
(
ResponseCode
.
RES_SUCCESS
, result, null);
23
}
24
25
@Override
26
public
void
onFailed
(
int
code) {
27
onResult
(code, null, null);
28
}
29
30
@Override
31
public
void
onException
(Throwable exception) {
32
exception.printStackTrace();
33
onResult
(
ResponseCode
.
RES_EXCEPTION
, null, exception);
34
}
35
}
com.netease.nimlib.sdk.ResponseCode
云信服务器主要响应码定义
Definition:
ResponseCode.java:6
com.netease.nimlib.sdk.ResponseCode.RES_EXCEPTION
static final short RES_EXCEPTION
操作出现异常
Definition:
ResponseCode.java:318
com.netease.nimlib.sdk.RequestCallbackWrapper.onResult
abstract void onResult(int code, T result, Throwable exception)
调用结果回调函数
com.netease.nimlib.sdk.RequestCallbackWrapper.onFailed
void onFailed(int code)
操作失败
Definition:
RequestCallbackWrapper.java:26
com.netease.nimlib.sdk.RequestCallbackWrapper.onSuccess
void onSuccess(T result)
操作成功
Definition:
RequestCallbackWrapper.java:21
com.netease.nimlib.sdk.RequestCallbackWrapper.onException
void onException(Throwable exception)
操作过程中发生异常
Definition:
RequestCallbackWrapper.java:31
com.netease.nimlib.sdk.ResponseCode.RES_SUCCESS
static final short RES_SUCCESS
操作成功
Definition:
ResponseCode.java:11
com.netease.nimlib.sdk.RequestCallback
请求回调接口
Definition:
RequestCallback.java:6
com.netease.nimlib.sdk.RequestCallbackWrapper
RequestCallback的一个包裹类,将3个结果的调用转到一个接口上,以供上层调用者精简代码,不必每次调用都需...
Definition:
RequestCallbackWrapper.java:10
生成于 2024年 七月 4日 星期四 17:33:51 , 为 NIMSDK-AOS使用
1.8.13