NIMSDK-AOS
9.19.0
plugins
qchat
src
main
java
com
netease
nimlib
sdk
qchat
QChatMessageService.java
浏览该文件的文档.
1
package
com.netease.nimlib.sdk.qchat;
2
3
import
androidx.annotation.NonNull;
4
5
import
com
.
netease
.
nimlib
.apt.annotation.NIMService;
6
import
com
.
netease
.
nimlib
.
sdk
.
AbortableFuture
;
7
import
com
.
netease
.
nimlib
.
sdk
.
InvocationFuture
;
8
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
model
.
QChatMessageCache
;
9
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatAddQuickCommentParam
;
10
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatAreMentionedMeMessagesParam
;
11
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatDeleteMessageParam
;
12
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatDownloadAttachmentParam
;
13
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetCommentatorsParam
;
14
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetLastMessageOfChannelsParam
;
15
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetMentionedMeMessagesParam
;
16
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetMessageHistoryByIdsParam
;
17
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetMessageHistoryParam
;
18
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetMessageThreadInfosParam
;
19
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetQuickCommentsParam
;
20
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetReferMessagesParam
;
21
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatGetThreadMessagesParam
;
22
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatMarkMessageReadParam
;
23
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatMarkSystemNotificationsReadParam
;
24
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatRemoveQuickCommentParam
;
25
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatReplyMessageParam
;
26
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatResendMessageParam
;
27
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatResendSystemNotificationParam
;
28
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatRevokeMessageParam
;
29
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatSearchMsgByPageParam
;
30
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatSendMessageParam
;
31
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatSendSystemNotificationParam
;
32
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatSendTypingEventParam
;
33
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatUpdateMessageParam
;
34
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
param
.
QChatUpdateSystemNotificationParam
;
35
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatAreMentionedMeMessagesResult
;
36
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatDeleteMessageResult
;
37
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetCommentatorsResult
;
38
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetLastMessageOfChannelsResult
;
39
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetMentionedMeMessagesResult
;
40
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetMessageHistoryResult
;
41
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetMessageThreadInfosResult
;
42
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetQuickCommentsResult
;
43
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetReferMessagesResult
;
44
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatGetThreadMessagesResult
;
45
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatRevokeMessageResult
;
46
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatSearchMsgByPageResult
;
47
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatSendMessageResult
;
48
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatSendSystemNotificationResult
;
49
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatSendTypingEventResult
;
50
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatUpdateMessageResult
;
51
import
com
.
netease
.
nimlib
.
sdk
.
qchat
.
result
.
QChatUpdateSystemNotificationResult
;
52
53
import
java.util.List;
54
55
@NIMService(
"圈组消息服务"
)
56
public interface
QChatMessageService
{
57
58
/**
59
* 发送消息
60
* @param param
61
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回发送成功的消息
62
*/
63
InvocationFuture<QChatSendMessageResult>
sendMessage(@NonNull
QChatSendMessageParam
param);
64
65
/**
66
* 回复消息
67
* @param param
68
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回发送成功的消息
69
*/
70
InvocationFuture<QChatSendMessageResult>
replyMessage(@NonNull
QChatReplyMessageParam
param);
71
72
/**
73
* 重发消息
74
* @param param
75
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回发送成功的消息
76
*/
77
InvocationFuture<QChatSendMessageResult>
resendMessage(@NonNull
QChatResendMessageParam
param);
78
79
/**
80
* 默认情况下(SDKOPtions#preloadAttach为true),SDK收到多媒体消息后,图片和视频会自动下载缩略图,音频会自动下载文件。如果下载原图或者原视频等,可调用该接口下载附件
81
*
82
* @param param
83
* @return AbortableFuture 调用跟踪。可设置回调函数,可中止下载操作
84
*/
85
AbortableFuture<Void>
downloadAttachment(
QChatDownloadAttachmentParam
param);
86
87
/**
88
* 查询历史消息
89
* @param param
90
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回查询到的历史消息
91
*/
92
InvocationFuture<QChatGetMessageHistoryResult>
getMessageHistory(@NonNull
QChatGetMessageHistoryParam
param);
93
94
/**
95
* 更新消息
96
* @param param
97
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回更新成功的消息
98
*/
99
InvocationFuture<QChatUpdateMessageResult>
updateMessage(@NonNull
QChatUpdateMessageParam
param);
100
101
/**
102
* 撤回消息
103
* @param param
104
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回撤回成功的消息
105
*/
106
InvocationFuture<QChatRevokeMessageResult>
revokeMessage(@NonNull
QChatRevokeMessageParam
param);
107
108
/**
109
* 删除消息
110
* @param param
111
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回删除成功的消息
112
*/
113
InvocationFuture<QChatDeleteMessageResult>
deleteMessage(@NonNull
QChatDeleteMessageParam
param);
114
115
/**
116
* 标记消息已读,该接口存在频控,300ms内只能调用1次
117
*
118
* @param param
119
* @return InvocationFuture 可设置回调函数,监听操作结果。
120
*/
121
InvocationFuture<Void>
markMessageRead(@NonNull
QChatMarkMessageReadParam
param);
122
123
/**
124
* 发送系统通知
125
* @param param
126
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回发送成功的自定义系统通知
127
*/
128
InvocationFuture<QChatSendSystemNotificationResult>
sendSystemNotification(@NonNull
QChatSendSystemNotificationParam
param);
129
130
/**
131
* 重发系统通知
132
* @param param
133
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回发送成功的自定义系统通知
134
*/
135
InvocationFuture<QChatSendSystemNotificationResult>
resendSystemNotification(@NonNull
QChatResendSystemNotificationParam
param);
136
137
/**
138
* 更新系统通知,除了更新自定义系统通知外,还允许更新邀请服务器成员、拒绝邀请、申请加入服务器、拒绝申请这几种内置系统通知
139
* @param param
140
* @return InvocationFuture 可设置回调函数,监听操作结果。回调中返回更新成功的系统通知
141
*/
142
InvocationFuture<QChatUpdateSystemNotificationResult>
updateSystemNotification(@NonNull
QChatUpdateSystemNotificationParam
param);
143
144
/**
145
* 标记系统通知已读
146
* @param param
147
* @return InvocationFuture 可设置回调函数,监听操作结果。
148
*/
149
InvocationFuture<Void>
markSystemNotificationsRead(@NonNull
QChatMarkSystemNotificationsReadParam
param);
150
151
/**
152
* 清除消息通知栏
153
*/
154
void
clearMsgNotify();
155
156
/**
157
* 根据消息id查询历史消息
158
* @param param
159
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回查询到的历史消息
160
*/
161
InvocationFuture<QChatGetMessageHistoryResult>
getMessageHistoryByIds(@NonNull
QChatGetMessageHistoryByIdsParam
param);
162
163
/**
164
* 根据消息查询被引用的消息详情
165
* @param param
166
* @return
167
*/
168
InvocationFuture<QChatGetReferMessagesResult>
getReferMessages(@NonNull
QChatGetReferMessagesParam
param);
169
/**
170
* 查询thread聊天的历史
171
* @param param
172
* @return
173
*/
174
InvocationFuture<QChatGetThreadMessagesResult>
getThreadMessages(@NonNull
QChatGetThreadMessagesParam
param);
175
176
/**
177
* 批量查询thread聊天信息
178
* @param param
179
* @return
180
*/
181
InvocationFuture<QChatGetMessageThreadInfosResult>
getMessageThreadInfos(@NonNull
QChatGetMessageThreadInfosParam
param);
182
183
/**
184
* 添加一条快捷评论
185
* @param param
186
* @return
187
*/
188
InvocationFuture<Void>
addQuickComment(@NonNull
QChatAddQuickCommentParam
param);
189
190
/**
191
* 删除一条快捷评论
192
* @param param
193
* @return
194
*/
195
InvocationFuture<Void>
removeQuickComment(@NonNull
QChatRemoveQuickCommentParam
param);
196
197
/**
198
* 批量查询快捷评论
199
* @param param
200
* @return
201
*/
202
InvocationFuture<QChatGetQuickCommentsResult>
getQuickComments(@NonNull
QChatGetQuickCommentsParam
param);
203
204
/**
205
* 查询快捷评论消息的评论者列表
206
*
207
* @param param 查询参数,详见{@link QChatGetCommentatorsParam}
208
* @return 评论者列表查询结果,详见{@link QChatGetCommentatorsResult}
209
*/
210
InvocationFuture<QChatGetCommentatorsResult>
getCommentators(@NonNull
QChatGetCommentatorsParam
param);
211
212
/**
213
* 指定通道查询消息缓存
214
*
215
* @param qchatChannelId 圈组通道名
216
* @return 缓存消息
217
*/
218
InvocationFuture<List<QChatMessageCache>
> getMessageCache(
long
qchatServerId,
long
qchatChannelId);
219
220
/**
221
* 指定通道查询消息缓存(同步接口)
222
*
223
* @param qchatChannelId 圈组通道名
224
* @return 缓存消息
225
*/
226
List<QChatMessageCache> getMessageCacheBlock(
long
qchatServerId,
long
qchatChannelId);
227
228
/**
229
* 清空消息缓存
230
*/
231
void
clearMessageCache();
232
233
/**
234
* 发送消息正在输入事件
235
* 接收方需要调用订阅指定频道事件订阅正在输入事件后后才能就可以收到指定频道的正在输入事件
236
* @param param
237
* @return
238
*/
239
InvocationFuture<QChatSendTypingEventResult>
sendTypingEvent(
QChatSendTypingEventParam
param);
240
241
242
/**
243
* 查询频道的最后一条消息
244
* @param param
245
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回查询到的历史消息
246
*/
247
InvocationFuture<QChatGetLastMessageOfChannelsResult>
getLastMessageOfChannels(@NonNull
QChatGetLastMessageOfChannelsParam
param);
248
249
/**
250
* 检索消息
251
* @param param
252
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回查询到的消息列表
253
*/
254
InvocationFuture<QChatSearchMsgByPageResult>
searchMsgByPage(@NonNull
QChatSearchMsgByPageParam
param);
255
256
/**
257
* 分页查询指定频道@我的消息
258
* @param param
259
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回查询到的消息列表
260
*/
261
InvocationFuture<QChatGetMentionedMeMessagesResult>
getMentionedMeMessages(@NonNull
QChatGetMentionedMeMessagesParam
param);
262
263
/**
264
* 批量查询消息是否@当前用户
265
* @param param
266
* @return InvocationFuture 可设置回调函数,监听操作结果。回调返回消息是否@当前用户结果
267
*/
268
InvocationFuture<QChatAreMentionedMeMessagesResult>
areMentionedMeMessages(@NonNull
QChatAreMentionedMeMessagesParam
param);
269
270
/**
271
* 增加一条数据,如果该频道下已经存在数据,则被新数据覆盖。
272
*
273
* @param serverId 服务器Id
274
* @param channelId 频道Id
275
* @param value 最大长度为10000
276
*
277
* @return boolean
278
* true:成功添加或者替换
279
* false:其它
280
*/
281
boolean
insertOrReplaceTextCache(
long
serverId,
long
channelId, @NonNull String value);
282
283
/**
284
* 删除数据。
285
* serverId > 0 && channelId > 0:删除指定频道的数据
286
* serverId > 0 && channelId == 0:删除指定服务器下所有频道的数据
287
* serverId == 0 && channelId > 0:返回失败
288
* serverId == 0 && channelId == 0:清空数据
289
*
290
* @param serverId 服务器Id
291
* @param channelId 频道Id
292
*
293
* @return boolean
294
* true:完成执行删除操作
295
* false:其它
296
*/
297
boolean
deleteTextCache(
long
serverId,
long
channelId);
298
299
300
/**
301
* 批量查询消息是否@当前用户
302
*
303
* @param serverId 服务器Id
304
* @param channelId 频道Id
305
*
306
* @return String
307
*/
308
String getTextCache(
long
serverId,
long
channelId);
309
}
com.netease.nimlib.sdk.qchat.param.QChatDownloadAttachmentParam
"下载附件"接口入参
Definition:
QChatDownloadAttachmentParam.java:9
com.netease.nimlib.sdk.qchat.result.QChatGetThreadMessagesResult
Definition:
QChatGetThreadMessagesResult.java:8
com.netease.nimlib.sdk
Definition:
RequestCallback.java:1
com.netease.nimlib.sdk.qchat.result.QChatAreMentionedMeMessagesResult
批量查询消息是否@当前用户接口 结果
Definition:
QChatAreMentionedMeMessagesResult.java:9
com.netease.nimlib.sdk.qchat.param.QChatAreMentionedMeMessagesParam
"批量查询消息是否@当前用户"接口入参
Definition:
QChatAreMentionedMeMessagesParam.java:11
com.netease.nimlib.sdk.qchat.param.QChatGetThreadMessagesParam
"查询thread聊天的历史"接口入参
Definition:
QChatGetThreadMessagesParam.java:10
com.netease.nimlib.sdk.qchat.param.QChatSendSystemNotificationParam
"发送系统通知"接口入参
Definition:
QChatSendSystemNotificationParam.java:19
com.netease.nimlib.sdk.qchat.param
Definition:
QChatPushConfigParam.java:1
com.netease.nimlib.sdk.qchat.result.QChatRevokeMessageResult
Definition:
QChatRevokeMessageResult.java:7
com.netease
com.netease.nimlib.sdk.qchat.result.QChatGetLastMessageOfChannelsResult
Definition:
QChatGetLastMessageOfChannelsResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatSendMessageParam
"发送消息"接口入参
Definition:
QChatSendMessageParam.java:20
com.netease.nimlib.sdk.qchat.param.QChatUpdateMessageParam
"更新消息"接口入参
Definition:
QChatUpdateMessageParam.java:10
com.netease.nimlib.sdk.qchat.result.QChatGetReferMessagesResult
Definition:
QChatGetReferMessagesResult.java:7
com.netease.nimlib.sdk.qchat.QChatMessageService
Definition:
QChatMessageService.java:56
com.netease.nimlib.sdk.qchat.result.QChatGetQuickCommentsResult
Definition:
QChatGetQuickCommentsResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatMarkMessageReadParam
"标记已读"接口入参
Definition:
QChatMarkMessageReadParam.java:8
com
com.netease.nimlib.sdk.InvocationFuture
调用跟踪
Definition:
InvocationFuture.java:6
com.netease.nimlib.sdk.qchat.param.QChatGetMessageHistoryByIdsParam
"根据消息id查询历史消息"接口入参
Definition:
QChatGetMessageHistoryByIdsParam.java:10
com.netease.nimlib.sdk.qchat.param.QChatSendTypingEventParam
"发送消息正在输入事件"接口入参
Definition:
QChatSendTypingEventParam.java:10
com.netease.nimlib.sdk.qchat.param.QChatGetMentionedMeMessagesParam
"分页查询指定频道@我的消息"接口入参
Definition:
QChatGetMentionedMeMessagesParam.java:6
com.netease.nimlib.sdk.AbortableFuture
可中断操作的调用跟踪接口。
Definition:
AbortableFuture.java:6
com.netease.nimlib.sdk.qchat.param.QChatRemoveQuickCommentParam
Definition:
QChatRemoveQuickCommentParam.java:6
com.netease.nimlib.sdk.qchat.result.QChatSendSystemNotificationResult
Definition:
QChatSendSystemNotificationResult.java:7
com.netease.nimlib.sdk.qchat.result.QChatGetMessageHistoryResult
Definition:
QChatGetMessageHistoryResult.java:8
com.netease.nimlib.sdk.qchat.param.QChatGetCommentatorsParam
"获取评论者列表"接口入参
Definition:
QChatGetCommentatorsParam.java:6
com.netease.nimlib.sdk.qchat.param.QChatGetMessageHistoryParam
"查询历史消息"接口入参
Definition:
QChatGetMessageHistoryParam.java:8
com.netease.nimlib.sdk.qchat.param.QChatSearchMsgByPageParam
检索消息的接口入参
Definition:
QChatSearchMsgByPageParam.java:11
com.netease.nimlib.sdk.qchat.result.QChatGetMessageThreadInfosResult
Definition:
QChatGetMessageThreadInfosResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatResendSystemNotificationParam
"重发系统通知"接口入参
Definition:
QChatResendSystemNotificationParam.java:9
com.netease.nimlib.sdk.qchat.model
Definition:
QChatPushConfig.java:1
com.netease.nimlib.sdk.qchat.result.QChatSendTypingEventResult
发送正在输入事件结果
Definition:
QChatSendTypingEventResult.java:9
com.netease.nimlib.sdk.qchat.result.QChatSendMessageResult
Definition:
QChatSendMessageResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatDeleteMessageParam
"删除消息"接口入参
Definition:
QChatDeleteMessageParam.java:8
com.netease.nimlib.sdk.qchat.model.QChatMessageCache
Definition:
QChatMessageCache.java:5
com.netease.nimlib.sdk.qchat
com.netease.nimlib.sdk.qchat.result.QChatGetMentionedMeMessagesResult
分页查询指定频道@我的消息接口 结果
Definition:
QChatGetMentionedMeMessagesResult.java:10
com.netease.nimlib.sdk.qchat.result.QChatUpdateSystemNotificationResult
Definition:
QChatUpdateSystemNotificationResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatGetLastMessageOfChannelsParam
"查询历史消息"接口入参
Definition:
QChatGetLastMessageOfChannelsParam.java:9
com.netease.nimlib.sdk.qchat.param.QChatReplyMessageParam
"回复消息"接口入参
Definition:
QChatReplyMessageParam.java:9
com.netease.nimlib.sdk.qchat.param.QChatGetReferMessagesParam
Definition:
QChatGetReferMessagesParam.java:7
com.netease.nimlib.sdk.qchat.result.QChatDeleteMessageResult
Definition:
QChatDeleteMessageResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatUpdateSystemNotificationParam
"更新系统通知"接口入参
Definition:
QChatUpdateSystemNotificationParam.java:12
com.netease.nimlib.sdk.qchat.param.QChatRevokeMessageParam
"撤回消息"接口入参
Definition:
QChatRevokeMessageParam.java:8
com.netease.nimlib.sdk.qchat.param.QChatAddQuickCommentParam
Definition:
QChatAddQuickCommentParam.java:6
com.netease.nimlib.sdk.qchat.result
Definition:
QChatLeaveServerAsVisitorResult.java:1
com.netease.nimlib.sdk.qchat.param.QChatGetQuickCommentsParam
Definition:
QChatGetQuickCommentsParam.java:7
com.netease.nimlib.sdk.qchat.result.QChatSearchMsgByPageResult
检索消息的接口 结果
Definition:
QChatSearchMsgByPageResult.java:10
com.netease.nimlib.sdk.qchat.result.QChatUpdateMessageResult
Definition:
QChatUpdateMessageResult.java:7
com.netease.nimlib.sdk.qchat.param.QChatMarkSystemNotificationsReadParam
"标记系统通知已读"接口入参
Definition:
QChatMarkSystemNotificationsReadParam.java:14
com.netease.nimlib
com.netease.nimlib.sdk.qchat.param.QChatResendMessageParam
"重发消息"接口入参
Definition:
QChatResendMessageParam.java:10
com.netease.nimlib.sdk.qchat.param.QChatGetMessageThreadInfosParam
Definition:
QChatGetMessageThreadInfosParam.java:7
com.netease.nimlib.sdk.qchat.result.QChatGetCommentatorsResult
Definition:
QChatGetCommentatorsResult.java:8
生成于 2024年 十月 16日 星期三 10:25:06 , 为 NIMSDK-AOS使用
1.8.13