NIMSDK-AOS  9.16.0
QChatGetMessageHistoryParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
4 
9 
13  @NonNull
14  private final Long serverId;
18  @NonNull
19  private final Long channelId;
23  private Long fromTime;
27  private Long toTime;
31  private Long excludeMessageId;
35  private Integer limit;
39  private Boolean reverse = false;
44  private Boolean includeLocalMessages = false;
45 
51  public QChatGetMessageHistoryParam(long serverId, long channelId) {
52  this.serverId = serverId;
53  this.channelId = channelId;
54  }
55 
60  @NonNull
61  public Long getServerId() {
62  return serverId;
63  }
64 
69  @NonNull
70  public Long getChannelId() {
71  return channelId;
72  }
73 
78  public Long getFromTime() {
79  return fromTime;
80  }
81 
87  public void setFromTime(Long fromTime) {
88  this.fromTime = fromTime;
89  }
90 
95  public Long getToTime() {
96  return toTime;
97  }
98 
103  public void setToTime(Long toTime) {
104  this.toTime = toTime;
105  }
106 
111  public Long getExcludeMessageId() {
112  return excludeMessageId;
113  }
114 
119  public void setExcludeMessageId(Long excludeMsgId) {
120  this.excludeMessageId = excludeMsgId;
121  }
122 
127  public Integer getLimit() {
128  return limit;
129  }
130 
135  public void setLimit(Integer limit) {
136  this.limit = limit;
137  }
138 
143  public Boolean isReverse() {
144  return reverse;
145  }
146 
151  public void setReverse(Boolean reverse) {
152  this.reverse = reverse;
153  }
154 
159  public Boolean isIncludeLocalMessages() {
160  return includeLocalMessages;
161  }
162 
167  public void setIncludeLocalMessages(Boolean includeLocalMessages) {
168  this.includeLocalMessages = includeLocalMessages;
169  }
170 }
Boolean isIncludeLocalMessages()
是否包含本地发送失败的消息
void setIncludeLocalMessages(Boolean includeLocalMessages)
设置是否包含本地发送失败的消息
void setFromTime(Long fromTime)
设置起始时间 如果要查最新的100条,则fromTime=0, toTime=0, limit=0, reverse=0