NIMSDK-AOS 10.3.0-beta
载入中...
搜索中...
未找到
QChatMessageService.java
浏览该文件的文档.
1package com.netease.nimlib.sdk.qchat;
2
3import androidx.annotation.NonNull;
4
5import com.netease.nimlib.apt.annotation.NIMService;
6import com.netease.nimlib.sdk.AbortableFuture;
7import com.netease.nimlib.sdk.InvocationFuture;
8import com.netease.nimlib.sdk.qchat.model.QChatMessageCache;
9import com.netease.nimlib.sdk.qchat.param.QChatAddQuickCommentParam;
10import com.netease.nimlib.sdk.qchat.param.QChatAreMentionedMeMessagesParam;
11import com.netease.nimlib.sdk.qchat.param.QChatDeleteMessageParam;
12import com.netease.nimlib.sdk.qchat.param.QChatDownloadAttachmentParam;
13import com.netease.nimlib.sdk.qchat.param.QChatGetCommentatorsParam;
14import com.netease.nimlib.sdk.qchat.param.QChatGetLastMessageOfChannelsParam;
15import com.netease.nimlib.sdk.qchat.param.QChatGetMentionedMeMessagesParam;
16import com.netease.nimlib.sdk.qchat.param.QChatGetMessageHistoryByIdsParam;
17import com.netease.nimlib.sdk.qchat.param.QChatGetMessageHistoryParam;
18import com.netease.nimlib.sdk.qchat.param.QChatGetMessageThreadInfosParam;
19import com.netease.nimlib.sdk.qchat.param.QChatGetQuickCommentsParam;
20import com.netease.nimlib.sdk.qchat.param.QChatGetReferMessagesParam;
21import com.netease.nimlib.sdk.qchat.param.QChatGetThreadMessagesParam;
22import com.netease.nimlib.sdk.qchat.param.QChatMarkMessageReadParam;
23import com.netease.nimlib.sdk.qchat.param.QChatMarkSystemNotificationsReadParam;
24import com.netease.nimlib.sdk.qchat.param.QChatRemoveQuickCommentParam;
25import com.netease.nimlib.sdk.qchat.param.QChatReplyMessageParam;
26import com.netease.nimlib.sdk.qchat.param.QChatResendMessageParam;
27import com.netease.nimlib.sdk.qchat.param.QChatResendSystemNotificationParam;
28import com.netease.nimlib.sdk.qchat.param.QChatRevokeMessageParam;
29import com.netease.nimlib.sdk.qchat.param.QChatSearchMsgByPageParam;
30import com.netease.nimlib.sdk.qchat.param.QChatSendMessageParam;
31import com.netease.nimlib.sdk.qchat.param.QChatSendSystemNotificationParam;
32import com.netease.nimlib.sdk.qchat.param.QChatSendTypingEventParam;
33import com.netease.nimlib.sdk.qchat.param.QChatUpdateMessageParam;
34import com.netease.nimlib.sdk.qchat.param.QChatUpdateSystemNotificationParam;
35import com.netease.nimlib.sdk.qchat.result.QChatAreMentionedMeMessagesResult;
36import com.netease.nimlib.sdk.qchat.result.QChatDeleteMessageResult;
37import com.netease.nimlib.sdk.qchat.result.QChatGetCommentatorsResult;
38import com.netease.nimlib.sdk.qchat.result.QChatGetLastMessageOfChannelsResult;
39import com.netease.nimlib.sdk.qchat.result.QChatGetMentionedMeMessagesResult;
40import com.netease.nimlib.sdk.qchat.result.QChatGetMessageHistoryResult;
41import com.netease.nimlib.sdk.qchat.result.QChatGetMessageThreadInfosResult;
42import com.netease.nimlib.sdk.qchat.result.QChatGetQuickCommentsResult;
43import com.netease.nimlib.sdk.qchat.result.QChatGetReferMessagesResult;
44import com.netease.nimlib.sdk.qchat.result.QChatGetThreadMessagesResult;
45import com.netease.nimlib.sdk.qchat.result.QChatRevokeMessageResult;
46import com.netease.nimlib.sdk.qchat.result.QChatSearchMsgByPageResult;
47import com.netease.nimlib.sdk.qchat.result.QChatSendMessageResult;
48import com.netease.nimlib.sdk.qchat.result.QChatSendSystemNotificationResult;
49import com.netease.nimlib.sdk.qchat.result.QChatSendTypingEventResult;
50import com.netease.nimlib.sdk.qchat.result.QChatUpdateMessageResult;
51import com.netease.nimlib.sdk.qchat.result.QChatUpdateSystemNotificationResult;
52
53import java.util.List;
54
55@NIMService("圈组消息服务")
56public interface QChatMessageService {
57
64
71
78
86
93
100
107
114
122
129
136
143
150
155
162
175
182
189
196
203
211
218 InvocationFuture<List<QChatMessageCache>> getMessageCache(long qchatServerId, long qchatChannelId);
219
226 List<QChatMessageCache> getMessageCacheBlock(long qchatServerId, long qchatChannelId);
227
232
240
241
248
255
262
269
281 boolean insertOrReplaceTextCache(long serverId, long channelId, @NonNull String value);
282
297 boolean deleteTextCache(long serverId, long channelId);
298
299
308 String getTextCache(long serverId, long channelId);
309}
可中断操作的调用跟踪接口。
InvocationFuture< QChatSendMessageResult > resendMessage(@NonNull QChatResendMessageParam param)
重发消息
InvocationFuture< QChatGetQuickCommentsResult > getQuickComments(@NonNull QChatGetQuickCommentsParam param)
批量查询快捷评论
InvocationFuture< QChatSendTypingEventResult > sendTypingEvent(QChatSendTypingEventParam param)
发送消息正在输入事件 接收方需要调用订阅指定频道事件订阅正在输入事件后后才能就可以收到指定频道的正在输入事件
InvocationFuture< QChatGetThreadMessagesResult > getThreadMessages(@NonNull QChatGetThreadMessagesParam param)
查询thread聊天的历史
String getTextCache(long serverId, long channelId)
批量查询消息是否@当前用户
InvocationFuture< QChatSearchMsgByPageResult > searchMsgByPage(@NonNull QChatSearchMsgByPageParam param)
检索消息
InvocationFuture< QChatSendMessageResult > replyMessage(@NonNull QChatReplyMessageParam param)
回复消息
List< QChatMessageCache > getMessageCacheBlock(long qchatServerId, long qchatChannelId)
指定通道查询消息缓存(同步接口)
InvocationFuture< QChatGetMentionedMeMessagesResult > getMentionedMeMessages(@NonNull QChatGetMentionedMeMessagesParam param)
分页查询指定频道@我的消息
InvocationFuture< Void > markMessageRead(@NonNull QChatMarkMessageReadParam param)
标记消息已读,该接口存在频控,300ms内只能调用1次
InvocationFuture< QChatRevokeMessageResult > revokeMessage(@NonNull QChatRevokeMessageParam param)
撤回消息
InvocationFuture< QChatSendSystemNotificationResult > sendSystemNotification(@NonNull QChatSendSystemNotificationParam param)
发送系统通知
InvocationFuture< QChatGetCommentatorsResult > getCommentators(@NonNull QChatGetCommentatorsParam param)
查询快捷评论消息的评论者列表
InvocationFuture< QChatSendMessageResult > sendMessage(@NonNull QChatSendMessageParam param)
发送消息
InvocationFuture< QChatSendSystemNotificationResult > resendSystemNotification(@NonNull QChatResendSystemNotificationParam param)
重发系统通知
InvocationFuture< QChatGetLastMessageOfChannelsResult > getLastMessageOfChannels(@NonNull QChatGetLastMessageOfChannelsParam param)
查询频道的最后一条消息
InvocationFuture< Void > removeQuickComment(@NonNull QChatRemoveQuickCommentParam param)
删除一条快捷评论
InvocationFuture< QChatUpdateSystemNotificationResult > updateSystemNotification(@NonNull QChatUpdateSystemNotificationParam param)
更新系统通知,除了更新自定义系统通知外,还允许更新邀请服务器成员、拒绝邀请、申请加入服务器、拒绝申请这几种内置系统通知
InvocationFuture< Void > addQuickComment(@NonNull QChatAddQuickCommentParam param)
添加一条快捷评论
InvocationFuture< List< QChatMessageCache > > getMessageCache(long qchatServerId, long qchatChannelId)
指定通道查询消息缓存
InvocationFuture< Void > markSystemNotificationsRead(@NonNull QChatMarkSystemNotificationsReadParam param)
标记系统通知已读
InvocationFuture< QChatUpdateMessageResult > updateMessage(@NonNull QChatUpdateMessageParam param)
更新消息
InvocationFuture< QChatGetMessageHistoryResult > getMessageHistoryByIds(@NonNull QChatGetMessageHistoryByIdsParam param)
根据消息id查询历史消息
void clearMsgNotify()
清除消息通知栏
boolean deleteTextCache(long serverId, long channelId)
删除数据。 serverId > 0 && channelId > 0:删除指定频道的数据 serverId > 0 && channelId == 0:删除指定服务器下所有频道的数据 serverId...
InvocationFuture< QChatDeleteMessageResult > deleteMessage(@NonNull QChatDeleteMessageParam param)
删除消息
InvocationFuture< QChatGetMessageHistoryResult > getMessageHistory(@NonNull QChatGetMessageHistoryParam param)
查询历史消息
InvocationFuture< QChatGetMessageThreadInfosResult > getMessageThreadInfos(@NonNull QChatGetMessageThreadInfosParam param)
批量查询thread聊天信息
InvocationFuture< QChatAreMentionedMeMessagesResult > areMentionedMeMessages(@NonNull QChatAreMentionedMeMessagesParam param)
批量查询消息是否@当前用户
boolean insertOrReplaceTextCache(long serverId, long channelId, @NonNull String value)
增加一条数据,如果该频道下已经存在数据,则被新数据覆盖。
AbortableFuture< Void > downloadAttachment(QChatDownloadAttachmentParam param)
默认情况下(SDKOPtions::preloadAttach为true),SDK收到多媒体消息后,图片和视频会自动下载缩略图,音频会自动下载文件。如果下载原图或者原视频等,可调用该接口下载附件
InvocationFuture< QChatGetReferMessagesResult > getReferMessages(@NonNull QChatGetReferMessagesParam param)
根据消息查询被引用的消息详情