NIMSDK-AOS  9.20.10
ResponseCode.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk;
2 
3 /**
4  * 云信服务器主要响应码定义
5  */
6 public final class ResponseCode {
7 
8  /**
9  * 操作成功
10  */
11  public static final short RES_SUCCESS = 200;
12 
13  /**
14  * 密码不正确
15  */
16  public static final short RES_EUIDPASS = 302;
17 
18  /**
19  * 登录IP或MAC被禁
20  */
21  public static final short RES_ADDR_BLOCKED = 310;
22 
23  /**
24  * 内部帐户不允许在该地址登陆
25  */
26  public static final short RES_IP_NOT_ALLOWED = 315;
27 
28  /**
29  * 版本号太旧,需要升级
30  */
31  public static final short RES_VERSION_EXPIRED = 317;
32 
33  public static final short RES_NEED_RECONNECT2 = 398;
34  /**
35  * 需要重连
36  * 不在ResponseDispatcherPush#makeResponse中传给主进程,在其他地方直接通过RemoteAgent#response上抛
37  */
38  public static final short RES_NEED_RECONNECT = 398;
39 
40  /**
41  * 需要切换LBS
42  * 不在ResponseDispatcherPush#makeResponse中传给主进程,在其他地方直接通过RemoteAgent#response上抛
43  */
44  public static final short RES_NEED_CHANGE_LBS = 399;
45 
46  /**
47  * 应用被封禁
48  */
49  public static final short RES_FORBIDDEN = 403;
50 
51  /**
52  * 目标(对象或用户)不存在
53  */
54  public static final short RES_ENONEXIST = 404;
55 
56  /**
57  * 操作超时
58  */
59  public static final short RES_ETIMEOUT = 408;
60 
61  /**
62  * 参数错误
63  */
64  public static final short RES_EPARAM = 414;
65 
66  /**
67  * 网络连接出现问题
68  */
69  public static final short RES_ECONNECTION = 415;
70 
71  /**
72  * 操作太过频繁
73  */
74  public static final short RES_EFREQUENTLY = 416;
75 
76  /**
77  * 对象已经存在
78  */
79  public static final short RES_EEXIST = 417;
80 
81  /**
82  * 帐号被禁用
83  */
84  public static final short RES_ACCOUNT_BLOCK = 422;
85 
86  /**
87  * 设备不在信任设备表里
88  */
89  public static final short RES_DEVICE_NOT_TRUST = 431;
90  /**
91  * 重复操作
92  */
93  public static final short RES_OPERATION_DUPLICATE = 464;
94  /**
95  * 操作已完成,当前请求无效
96  */
97  public static final short RES_OPERATION_ALREADY_COMPLETED = 465;
98 
99  /**
100  * 服务器内部错误
101  */
102  public static final short RES_EUNKNOWN = 500;
103 
104  /**
105  * 操作数据库失败
106  */
107  public static final short RES_DB_EXCEPTION = 502;
108 
109  /**
110  * 服务器太忙
111  */
112  public static final short RES_TOOBUZY = 503;
113 
114  /**
115  * 超过期限
116  */
117  public static final short RES_OVERDUE = 508;
118 
119  /**
120  * 已经失效
121  */
122  public static final short RES_INVALID = 509;
123 
124  /**
125  * 红包功能不可用
126  */
127  public static final short RES_RP_INVALID = 515;
128 
129  /**
130  * 清空会话未读数部分成功
131  */
132  public static final short RES_CLEAR_UNREAD_PART_SUCCESS = 700;
133 
134  // 群错误码
135  /**
136  * 已达到人数限制
137  */
138  public static final short RES_TEAM_ECOUNT_LIMIT = 801;
139 
140  /**
141  * 没有权限
142  */
143  public static final short RES_TEAM_ENACCESS = 802;
144 
145  /**
146  * 群不存在
147  */
148  public static final short RES_TEAM_ENOTEXIST = 803;
149 
150  /**
151  * 用户不在群里面
152  */
153  public static final short RES_TEAM_EMEMBER_NOTEXIST = 804;
154 
155  /**
156  * 群类型不对
157  */
158  public static final short RES_TEAM_ERR_TYPE = 805;
159 
160  /**
161  * 群数量达到上限
162  */
163  public static final short RES_TEAM_LIMIT = 806;
164 
165  /**
166  * 群成员状态不对
167  */
168  public static final short RES_TEAM_USER_STATUS_ERR = 807;
169 
170  /**
171  * 申请成功
172  */
173  public static final short RES_TEAM_APPLY_SUCCESS = 808;
174 
175  /**
176  * 用户已经在群里了
177  */
178  public static final short RES_TEAM_ALREADY_IN = 809;
179 
180  /**
181  * 邀请成功
182  */
183  public static final short RES_TEAM_INVITE_SUCCESS = 810;
184 
185  /**
186  * 部分邀请成功,同时会有失败列表
187  */
188  public static final short RES_TEAM_INVITE_PART_SUCCESS = 813;
189 
190  /**
191  * 部分请求成功,同时会有失败列表
192  */
193  public static final short RES_TEAM_INFO_PART_SUCCESS = 816;
194 
195  /**
196  * 内部错误
197  */
198  public static final short RES_EPACKET = 999;
199 
200  /**
201  * 内部错误
202  */
203  public static final short RES_EUNPACKET = 998;
204 
205  /**
206  * 被接收方加入黑名单
207  */
208  public static final short RES_IN_BLACK_LIST = 7101;
209 
210  public static final int V2_RES_IN_BLACK_LIST = 102426;
211 
212 
213  /**
214  * **************************** 聊天室 ************************************
215  */
216 
217  /**
218  * IM主连接状态异常
219  */
220  public static final short RES_CHATROOM_IM_LINK_EXCEPTION = 13001;
221 
222  /**
223  * 聊天室状态异常
224  */
225  public static final short RES_CHATROOM_STATUS_EXCEPTION = 13002;
226 
227  /**
228  * 账号在黑名单中,不允许进入聊天室
229  */
230  public static final short RES_CHATROOM_BLACKLIST = 13003;
231 
232  /**
233  * 在禁言列表中,不允许发言
234  */
235  public static final short RES_CHATROOM_MUTED = 13004;
236 
237  /**
238  * 聊天室处于整体禁言状态,只有管理员能发言
239  */
240  public static final short RES_CHATROOM_ROOM_MUTED = 13006;
241 
242 
243  /**
244  * ********************************* 独立信令系统 ***************************
245  */
246 
247  /**
248  * 执行的操作已经成功,只是对方不在线(推送可达,但是离线)
249  */
250  public static final short RES_PEER_NIM_OFFLINE = 10201;
251 
252  /**
253  * 执行的操作已经成功,只是对方推送不可达
254  */
255  public static final short RES_PEER_PUSH_OFFLINE = 10202;
256  /**
257  * 对应的频道不存在
258  */
259  public static final short RES_CHANNEL_NOT_EXISTS = 10404;
260 
261  /**
262  * 对应的频道已存在
263  */
264  public static final short RES_CHANNEL_HAS_EXISTS = 10405;
265 
266  /**
267  * 不在频道内
268  */
269  public static final short RES_CHANNEL_MEMBER_NOT_EXISTS = 10406;
270 
271  /**
272  * 已经在频道内
273  */
274  public static final short RES_CHANNEL_MEMBER_HAS_EXISTS = 10407;
275  /**
276  * 邀请不存在或已过期
277  */
278  public static final short RES_INVITE_NOT_EXISTS = 10408;
279 
280  /**
281  * 邀请已经拒绝
282  */
283  public static final short RES_INVITE_HAS_REJECT = 10409;
284 
285  /**
286  * 邀请已经接受了
287  */
288  public static final short RES_INVITE_HAS_ACCEPT = 10410;
289 
290 
291  /**
292  * 加入频道uid 冲突
293  */
294  public static final short RES_JOIN_CHANNEL_UID_CONFLICT = 10417;
295 
296  /**
297  * 频道人数超限
298  */
299  public static final short RES_CHANNEL_MEMBER_EXCEED = 10419;
300  /**
301  * 已经在频道内(自己的其他端)
302  */
303  public static final short RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT = 10420;
304 
305  /**
306  * 第三方回调自定义错误码返回最小值,范围[20000,20099], 具体错误码对应关系由用户决定
307  */
308  public static final short RES_CALLBACK_CUSTOM_CODE_MIN = 20000;
309 
310  /**
311  * 第三方回调自定义错误码返回最大值, 20000- 20099
312  */
313  public static final short RES_CALLBACK_CUSTOM_CODE_MAX = 20099;
314 
315 
316  ////////////////////////////////////////////////////////
317  ////////////////////// 本地错误码 //////////////////////
318  ///////////////////////////////////////////////////////
319 
320  /**
321  * 未知
322  */
323  public static final short RES_UNKNOWN = -1;
324 
325  /**
326  * 操作出现异常
327  */
328  public static final short RES_EXCEPTION = 1000;
329 
330  /**
331  * SDK 回调上层操作出现异常
332  */
333  public static final short RES_CALLBACK_APP_EXCEPTION = 1001;
334 
335  /**
336  * SDK 异步转同步调用超时
337  */
338  public static final short RES_API_SYNC_TIMEOUT = 1002;
339 
340  /**
341  * SDK 异步转同步调用发生在带Looper的线程上(不允许在带Looper的线程上做同步调用)
342  */
343  public static final short RES_API_SYNC_RUN_ON_LOOPER_THREAD_EXCEPTION = 1003;
344 
345  /**
346  * SDK 异步转同步调用发生运行时异常(例如线程被中断异常)
347  */
348  public static final short RES_API_SYNC_RUNTIME_EXCEPTION = 1004;
349 
350  /**
351  * 当前未在线,无法操作
352  */
353  public static final short RES_OFFLINE = 1;
354 
355  /**
356  * 当前不支持的操作
357  */
358  public static final short RES_UNSUPPORT = 2;
359 
360  /**
361  * 注册第三方推送SDK获取token失败
362  */
363  public static final short RES_REGISTER_PUSH_SDK_FAILED = 3;
364 
365  /**
366  * 下载过期文件失败(对应于nos token scene)
367  */
368  public static final short DOWNLOAD_EXPIRE_FILE = 4;
369 
370  /**
371  * 使用了不合法的scene key
372  */
373  public static final short USE_INVALID_SCENE = 5;
374 
375  /**
376  * 找不到文件
377  */
378  public static final short FILE_NOT_FOUND = 6;
379 
380  /**
381  * 文件上传失败
382  */
383  public static final short FILE_UPLOAD_ERROR = 7;
384 
385  /**
386  * 注册第三方推送SDK超时
387  */
388  public static final short RES_REGISTER_PUSH_SDK_TIME_OUT = 8;
389 }
static final short RES_INVALID
已经失效
static final short RES_EUNKNOWN
服务器内部错误
static final short RES_EPACKET
内部错误
static final short RES_API_SYNC_RUN_ON_LOOPER_THREAD_EXCEPTION
SDK 异步转同步调用发生在带Looper的线程上(不允许在带Looper的线程上做同步调用)
static final short RES_CHATROOM_STATUS_EXCEPTION
聊天室状态异常
static final short RES_CHANNEL_MEMBER_EXCEED
频道人数超限
static final short USE_INVALID_SCENE
使用了不合法的scene key
static final short RES_PEER_PUSH_OFFLINE
执行的操作已经成功,只是对方推送不可达
static final short FILE_NOT_FOUND
找不到文件
static final short RES_IN_BLACK_LIST
被接收方加入黑名单
static final short RES_DEVICE_NOT_TRUST
设备不在信任设备表里
static final short RES_TOOBUZY
服务器太忙
static final short RES_CHATROOM_BLACKLIST
账号在黑名单中,不允许进入聊天室
static final short RES_IP_NOT_ALLOWED
内部帐户不允许在该地址登陆
static final short RES_CHANNEL_MEMBER_HAS_EXISTS
已经在频道内
static final short RES_INVITE_HAS_REJECT
邀请已经拒绝
static final short RES_CALLBACK_CUSTOM_CODE_MIN
第三方回调自定义错误码返回最小值,范围[20000,20099], 具体错误码对应关系由用户决定 ...
static final short RES_API_SYNC_RUNTIME_EXCEPTION
SDK 异步转同步调用发生运行时异常(例如线程被中断异常)
static final short RES_CLEAR_UNREAD_PART_SUCCESS
清空会话未读数部分成功
static final short RES_EUIDPASS
密码不正确
static final short RES_ADDR_BLOCKED
登录IP或MAC被禁
static final short RES_TEAM_ENACCESS
没有权限
static final short RES_OPERATION_DUPLICATE
重复操作
static final short RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT
已经在频道内(自己的其他端)
static final short RES_JOIN_CHANNEL_UID_CONFLICT
加入频道uid 冲突
static final short RES_TEAM_EMEMBER_NOTEXIST
用户不在群里面
static final short RES_TEAM_APPLY_SUCCESS
申请成功
static final short RES_DB_EXCEPTION
操作数据库失败
static final short RES_UNSUPPORT
当前不支持的操作
static final short RES_INVITE_HAS_ACCEPT
邀请已经接受了
云信服务器主要响应码定义
static final short RES_REGISTER_PUSH_SDK_FAILED
注册第三方推送SDK获取token失败
static final short RES_ACCOUNT_BLOCK
帐号被禁用
static final short RES_UNKNOWN
未知
static final short RES_RP_INVALID
红包功能不可用
static final short RES_EEXIST
对象已经存在
static final short RES_TEAM_USER_STATUS_ERR
群成员状态不对
static final short RES_REGISTER_PUSH_SDK_TIME_OUT
注册第三方推送SDK超时
static final short RES_TEAM_ENOTEXIST
群不存在
static final short RES_NEED_CHANGE_LBS
需要切换LBS 不在ResponseDispatcherPush::makeResponse中传给主进程,在其他地方直接通过RemoteAgent::resp...
static final short RES_CHATROOM_IM_LINK_EXCEPTION
**************************** 聊天室 ************************************
static final short RES_EXCEPTION
操作出现异常
static final short RES_ENONEXIST
目标(对象或用户)不存在
static final short RES_CALLBACK_APP_EXCEPTION
SDK 回调上层操作出现异常
static final short RES_EFREQUENTLY
操作太过频繁
static final short RES_OVERDUE
超过期限
static final short RES_CALLBACK_CUSTOM_CODE_MAX
第三方回调自定义错误码返回最大值, 20000- 20099
static final short RES_EUNPACKET
内部错误
static final short RES_CHATROOM_ROOM_MUTED
聊天室处于整体禁言状态,只有管理员能发言
static final short DOWNLOAD_EXPIRE_FILE
下载过期文件失败(对应于nos token scene)
static final short RES_OPERATION_ALREADY_COMPLETED
操作已完成,当前请求无效
static final short RES_CHANNEL_NOT_EXISTS
对应的频道不存在
static final short FILE_UPLOAD_ERROR
文件上传失败
static final short RES_TEAM_ALREADY_IN
用户已经在群里了
static final short RES_NEED_RECONNECT
需要重连 不在ResponseDispatcherPush::makeResponse中传给主进程,在其他地方直接通过RemoteAgent::respons...
static final short RES_TEAM_ECOUNT_LIMIT
已达到人数限制
static final short RES_TEAM_LIMIT
群数量达到上限
static final short RES_OFFLINE
当前未在线,无法操作
static final short RES_SUCCESS
操作成功
static final short RES_FORBIDDEN
应用被封禁
static final short RES_CHANNEL_MEMBER_NOT_EXISTS
不在频道内
static final short RES_TEAM_INFO_PART_SUCCESS
部分请求成功,同时会有失败列表
static final short RES_INVITE_NOT_EXISTS
邀请不存在或已过期
static final short RES_CHATROOM_MUTED
在禁言列表中,不允许发言
static final short RES_TEAM_INVITE_PART_SUCCESS
部分邀请成功,同时会有失败列表
static final short RES_ETIMEOUT
操作超时
static final short RES_VERSION_EXPIRED
版本号太旧,需要升级
static final short RES_ECONNECTION
网络连接出现问题
static final short RES_CHANNEL_HAS_EXISTS
对应的频道已存在
static final short RES_PEER_NIM_OFFLINE
********************************* 独立信令系统 ***************************
static final short RES_TEAM_INVITE_SUCCESS
邀请成功
static final short RES_TEAM_ERR_TYPE
群类型不对
static final short RES_NEED_RECONNECT2
static final short RES_EPARAM
参数错误
static final short RES_API_SYNC_TIMEOUT
SDK 异步转同步调用超时