public class ThreadMessageListParams
extends java.lang.Object
BaseMessage.getThreadedMessagesByTimestamp(long, ThreadMessageListParams, BaseMessage.GetThreadedMessagesHandler)
.Constructor and Description |
---|
ThreadMessageListParams() |
ThreadMessageListParams(int previousResultSize,
int nextResultSize,
BaseChannel.MessageTypeFilter messageType,
java.util.Collection<java.lang.String> customTypes,
java.util.List<java.lang.String> senderUserIds,
boolean inclusive,
boolean reverse,
boolean includeMetaArray,
boolean includeReactions,
boolean includeParentMessageInfo) |
ThreadMessageListParams(int previousResultSize,
int nextResultSize,
BaseChannel.MessageTypeFilter messageType,
java.util.Collection<java.lang.String> customTypes,
java.util.List<java.lang.String> senderUserIds,
boolean inclusive,
boolean reverse,
MessagePayloadFilter messagePayloadFilter) |
ThreadMessageListParams(int previousResultSize,
int nextResultSize,
BaseChannel.MessageTypeFilter messageType,
java.lang.String customType,
java.util.Collection<java.lang.String> customTypes,
java.util.List<java.lang.String> senderUserIds,
boolean inclusive,
boolean reverse,
boolean includeMetaArray,
boolean includeReactions,
boolean includeParentMessageInfo)
|
ThreadMessageListParams(int previousResultSize,
int nextResultSize,
BaseChannel.MessageTypeFilter messageType,
java.lang.String customType,
java.util.List<java.lang.String> senderUserIds,
boolean inclusive,
boolean reverse,
boolean includeMetaArray,
boolean includeReactions,
boolean includeParentMessageInfo) |
ThreadMessageListParams(int previousResultSize,
int nextResultSize,
BaseChannel.MessageTypeFilter messageType,
java.lang.String customType,
java.util.List<java.lang.String> senderUserIds,
boolean inclusive,
boolean reverse,
MessagePayloadFilter messagePayloadFilter) |
Modifier and Type | Method and Description |
---|---|
boolean |
belongsTo(BaseMessage message)
Verify that the given channel information matches the current query filter.
|
boolean |
belongsTo(BaseMessageParams params)
Verify that the given `BaseMessageParams` information matches the current query filter.
|
ThreadMessageListParams |
clone()
Clones and returns a new instance of
ThreadMessageListParams . |
java.lang.String |
getCustomType()
Returns the custom type of message.
|
java.util.Collection<java.lang.String> |
getCustomTypes()
Returns the custom types of message.
|
MessagePayloadFilter |
getMessagePayloadFilter()
Returns the
MessagePayloadFilter set in this param. |
BaseChannel.MessageTypeFilter |
getMessageType()
Returns the message type.
|
int |
getNextResultSize()
Returns the number of newer messages that you want to get.
|
int |
getPreviousResultSize()
Returns the number of previous messages that you want to get.
|
java.util.List<java.lang.String> |
getSenderUserIds()
Returns the sender user ids.
|
boolean |
isInclusive()
Returns a value whether to include the messages sent exactly on the specified timestamp or have the matching message ID in the results.
|
void |
setCustomType(java.lang.String customType)
Restricts the search scope only to retrieve the messages with the specified custom message type.
|
void |
setCustomTypes(java.util.Collection<java.lang.String> customTypes)
Restricts the search scope only to retrieve the messages that match any of given custom
types.
|
void |
setIncludeMetaArray(boolean includeMetaArray)
Determines whether to include the meta array information of the updated messages in the results.
|
void |
setIncludeParentMessageText(boolean includeParentMessageText)
Deprecated.
As of 3.0.173, replaced by
MessagePayloadFilter.setIncludeParentMessageInfo(boolean) by setMessagePayloadFilter(MessagePayloadFilter) . |
void |
setIncludeReactions(boolean includeReactions)
Determines whether to include the reactions to the updated messages in the results.
|
void |
setInclusive(boolean inclusive)
Determines whether to include the messages sent exactly on the specified timestamp or have the matching message ID in the results.
|
void |
setMessagePayloadFilter(MessagePayloadFilter messagePayloadFilter)
Sets the
MessagePayloadFilter to be used in retrieving message lists. |
void |
setMessageType(BaseChannel.MessageTypeFilter messageType)
Restricts the search scope only to retrieve the messages with the specified message type.
|
void |
setNextResultSize(int nextResultSize)
Set the number of newer messages added either before the timestamp or the message that has a specific message ID.
|
void |
setPreviousResultSize(int previousResultSize)
Set the number of previous messages added either before the timestamp or the message that has a specific message ID.
|
void |
setReverse(boolean reverse)
Determines whether to sort the retrieved messages in reverse order.
|
void |
setSenderUserIds(java.util.List<java.lang.String> senderUserIds)
Restricts the search scope only to retrieve the messages sent by the users with the specified user IDs.
|
boolean |
shouldIncludeMetaArray()
Returns whether the meta arrays should be included in the results.
|
boolean |
shouldIncludeParentMessageText()
Deprecated.
As of 3.0.173, replaced by
MessagePayloadFilter.shouldIncludeParentMessageInfo() from getMessagePayloadFilter() . |
boolean |
shouldIncludeReactions()
Returns whether the reaction data should be included in the results.
|
boolean |
shouldReverse()
Returns whether the results should be reversed.
|
java.lang.String |
toString() |
public ThreadMessageListParams()
public ThreadMessageListParams(int previousResultSize, int nextResultSize, BaseChannel.MessageTypeFilter messageType, java.lang.String customType, java.util.List<java.lang.String> senderUserIds, boolean inclusive, boolean reverse, MessagePayloadFilter messagePayloadFilter)
public ThreadMessageListParams(int previousResultSize, int nextResultSize, BaseChannel.MessageTypeFilter messageType, java.util.Collection<java.lang.String> customTypes, java.util.List<java.lang.String> senderUserIds, boolean inclusive, boolean reverse, MessagePayloadFilter messagePayloadFilter)
public ThreadMessageListParams(int previousResultSize, int nextResultSize, BaseChannel.MessageTypeFilter messageType, java.lang.String customType, java.util.List<java.lang.String> senderUserIds, boolean inclusive, boolean reverse, boolean includeMetaArray, boolean includeReactions, boolean includeParentMessageInfo)
public ThreadMessageListParams(int previousResultSize, int nextResultSize, BaseChannel.MessageTypeFilter messageType, java.util.Collection<java.lang.String> customTypes, java.util.List<java.lang.String> senderUserIds, boolean inclusive, boolean reverse, boolean includeMetaArray, boolean includeReactions, boolean includeParentMessageInfo)
@Deprecated public ThreadMessageListParams(int previousResultSize, int nextResultSize, BaseChannel.MessageTypeFilter messageType, java.lang.String customType, java.util.Collection<java.lang.String> customTypes, java.util.List<java.lang.String> senderUserIds, boolean inclusive, boolean reverse, boolean includeMetaArray, boolean includeReactions, boolean includeParentMessageInfo)
public ThreadMessageListParams clone()
ThreadMessageListParams
.clone
in class java.lang.Object
ThreadMessageListParams
.public boolean belongsTo(BaseMessageParams params)
params
- `BaseMessageParams` to check. Returns false if the `BaseMessageParams` is not matched with the current params's filter.public java.lang.String toString()
public void setPreviousResultSize(int previousResultSize)
previousResultSize
- number of loaded message size.public void setNextResultSize(int nextResultSize)
nextResultSize
- number of loaded message size.public void setMessageType(BaseChannel.MessageTypeFilter messageType)
messageType
- type of messages that should be loaded.public void setCustomType(java.lang.String customType)
customType
- custom type for messages.public void setCustomTypes(java.util.Collection<java.lang.String> customTypes)
customTypes
- custom types for the messages.public void setSenderUserIds(java.util.List<java.lang.String> senderUserIds)
senderUserIds
- list of sender's user ids.public void setInclusive(boolean inclusive)
inclusive
- If true
, the result will include messages with createdAt same as the given timestamp.public void setReverse(boolean reverse)
reverse
- If true
the result will be returned by creation time descending order.public void setIncludeMetaArray(boolean includeMetaArray)
MessagePayloadFilter.setIncludeMetaArray(boolean)
.includeMetaArray
- If true
the result will be returned with message meta array.setMessagePayloadFilter(MessagePayloadFilter).
public void setIncludeReactions(boolean includeReactions)
MessagePayloadFilter.setIncludeReactions(boolean)
.includeReactions
- If true
the result will be returned with message reactions.setMessagePayloadFilter(MessagePayloadFilter).
@Deprecated public void setIncludeParentMessageText(boolean includeParentMessageText)
MessagePayloadFilter.setIncludeParentMessageInfo(boolean)
by setMessagePayloadFilter(MessagePayloadFilter)
.BaseMessage.getMessage()
of the parent message.
If it is FileMessage, the value is the name of the uploaded file.
Internally, this will be set on MessagePayloadFilter.setIncludeParentMessageInfo(boolean)
.includeParentMessageText
- If true
the result will be returned with messages with parent's message's text, if the message is a reply message.setMessagePayloadFilter(MessagePayloadFilter).
public void setMessagePayloadFilter(MessagePayloadFilter messagePayloadFilter)
MessagePayloadFilter
to be used in retrieving message lists.
This is more preferred way of setting other include flags.messagePayloadFilter
- MessagePayloadFilter
with preferred filters set.public int getPreviousResultSize()
public int getNextResultSize()
public BaseChannel.MessageTypeFilter getMessageType()
public java.lang.String getCustomType()
public java.util.Collection<java.lang.String> getCustomTypes()
public java.util.List<java.lang.String> getSenderUserIds()
public boolean isInclusive()
public boolean shouldReverse()
public boolean shouldIncludeMetaArray()
getMessagePayloadFilter()
.public boolean shouldIncludeReactions()
getMessagePayloadFilter()
.@Deprecated public boolean shouldIncludeParentMessageText()
MessagePayloadFilter.shouldIncludeParentMessageInfo()
from getMessagePayloadFilter()
.getMessagePayloadFilter()
.public MessagePayloadFilter getMessagePayloadFilter()
MessagePayloadFilter
set in this param.MessagePayloadFilter
.public boolean belongsTo(BaseMessage message)
message
- BaseMessage to check. Returns false if the message is not matched with the params's filter. Copyright © 2021, Sendbird or its affiliates. All rights reserved.
Report a bug or request a feature
For further developer documentation, see Chat SDK Documentation. That documentation contains more detailed descriptions, conceptual overviews, definitions of terms, and code examples.