Class RemoteHistoryMsgOption
-
- All Implemented Interfaces:
public class RemoteHistoryMsgOption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
RemoteHistoryMsgOption.PullOrder
-
Constructor Summary
Constructors Constructor Description RemoteHistoryMsgOption()
RemoteHistoryMsgOption(long dataTime, int count, RemoteHistoryMsgOption.PullOrder pullOrder, boolean includeLocalExistMessage)
RemoteHistoryMsgOption(long dataTime, int count, int pullOrder, boolean includeLocalExistMessage)
-
Method Summary
Modifier and Type Method Description long
getDataTime()
Retrieves the starting point for pulling messages. void
setDataTime(long dataTime)
Sets the starting point for fetching messages. int
getCount()
Gets the number of messages to retrieve, with a maximum of 100. void
setCount(int count)
Sets the number of messages to retrieve, up to a maximum of 100. int
getOrder()
Gets the pull order. void
setOrder(int pullOrder)
Sets the pull order. void
setOrder(RemoteHistoryMsgOption.PullOrder pullOrder)
boolean
isIncludeLocalExistMessage()
Indicates whether to fetch messages repeatedly. int
describeContents()
void
writeToParcel(Parcel dest, int flags)
int
getConversationCount(ConversationType type)
boolean
isNeedList()
String
toString()
void
setIncludeLocalExistMessage(boolean includeLocalExistMessage)
Sets whether duplicate message retrieval is required. void
setNeedList(boolean needList)
-
-
Constructor Detail
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption()
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption(long dataTime, int count, RemoteHistoryMsgOption.PullOrder pullOrder, boolean includeLocalExistMessage)
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption(long dataTime, int count, int pullOrder, boolean includeLocalExistMessage)
-
-
Method Detail
-
getDataTime
long getDataTime()
Retrieves the starting point for pulling messages. This corresponds to the `sentTime` in the message. If there are no messages in the local database, pass 0 for the first pull. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.
- Returns:
The starting point for pulling messages. This corresponds to the `sentTime` in the message. If there are no messages in the local database, pass 0 for the first pull. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.
-
setDataTime
void setDataTime(long dataTime)
Sets the starting point for fetching messages. This corresponds to the sentTime in the message; if there are no messages in the local database, pass 0 for the first time, otherwise pass the sentTime of the earliest message to fetch the latest count messages.
- Parameters:
dataTime
- The starting point for fetching messages.
-
getCount
int getCount()
Gets the number of messages to retrieve, with a maximum of 100.
- Returns:
The number of messages to retrieve, with a maximum of 100.
-
setCount
void setCount(int count)
Sets the number of messages to retrieve, up to a maximum of 100.
- Parameters:
count
- The number of messages to retrieve, up to a maximum of 100.
-
getOrder
int getOrder()
Gets the pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.
- Returns:
The pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.
-
setOrder
@Deprecated() void setOrder(int pullOrder)
Sets the pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.
- Parameters:
pullOrder
- The pull order.
-
setOrder
void setOrder(RemoteHistoryMsgOption.PullOrder pullOrder)
-
isIncludeLocalExistMessage
boolean isIncludeLocalExistMessage()
Indicates whether to fetch messages repeatedly.
- Returns:
Whether to fetch messages repeatedly:
true
- Messages fetched from the server that exist in the local database will be returned to the user;false
- Messages fetched from the server that exist in the local database will not be returned to the user, only messages that do not exist in the database will be returned.
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
getConversationCount
int getConversationCount(ConversationType type)
-
isNeedList
boolean isNeedList()
-
toString
String toString()
-
setIncludeLocalExistMessage
void setIncludeLocalExistMessage(boolean includeLocalExistMessage)
Sets whether duplicate message retrieval is required.
- Parameters:
includeLocalExistMessage
- Indicates whether duplicate message retrieval is required.
-
setNeedList
void setNeedList(boolean needList)
-
-
-
-