Package 

Class PreviousMessageListQuery

    • Method Detail

      • setShowSubchannelMessagesOnly

         void setShowSubchannelMessagesOnly(boolean showSubchannelMessagesOnly)

        If set to true, only messages that belong to current user's subchannel is fetched.If set to false, all messages will be fetched. Default is false.Takes effect only when the requested channel is a dynamically partitioned open channel.

        Parameters:
        showSubchannelMessagesOnly - If false, all messages will be returned.
      • hasMore

         boolean hasMore()

        Checks if there are more previous messages.

      • isLoading

         synchronized boolean isLoading()

        Checks if the current query is in communication progress with server.

      • setLimit

         void setLimit(int limit)

        Sets the maximum number of messages per queried page.

        Parameters:
        limit - The maximum number of messages per page.
      • setReverse

         void setReverse(boolean reverse)

        Sets reverse.

        Parameters:
        reverse - If true the queried result will be returned by creation time descending order.
      • setCustomTypeFilter

         void setCustomTypeFilter(String customType)

        Sets custom type filter.

        Parameters:
        customType - Custom type.
      • setCustomTypesFilter

         void setCustomTypesFilter(Collection<String> customTypes)

        Sets custom type filter. when set, only messages with customType that equals to one ofcustomTypes will be returned. When a customType is an empty string (""), all messageswithout a custom type will be returned.

        Parameters:
        customTypes - Custom types.
      • setIncludeMetaArray

         void setIncludeMetaArray(boolean includeMetaArray)

        Sets message meta array.Internally, this will be set on setIncludeMetaArray.

        Parameters:
        includeMetaArray - If true the queried result will be returned with message meta array.
      • setIncludeReactions

         void setIncludeReactions(boolean includeReactions)

        Sets message reactions.Internally, this will be set on setIncludeReactions.

        Parameters:
        includeReactions - If true the queried result will be returned with message reactions.
      • setIncludeThreadInfo

         void setIncludeThreadInfo(boolean includeThreadInfo)

        Determines whether to include the thread information of the returned messages in the results when the results contain parent messages.Internally, this will be set on setIncludeThreadInfo.

        Parameters:
        includeThreadInfo - If true the queried result will be returned with thread information.
      • setIncludeReplies

        @Deprecated() void setIncludeReplies(boolean includeReplies)

        Determines whether replies are included in the results.

        Parameters:
        includeReplies - If true the queried result will be returned with reply messages as well.
      • setIncludeParentMessageText

        @Deprecated() void setIncludeParentMessageText(boolean includeParentMessageText)

        Determines whether to include the parent message text in the results when the updated messages are replies in a thread.If the type of the parent message is UserMessage, the value is a getMessage of the parent message.If it is FileMessage, the value is the name of the uploaded file.Internally, this will be set on setIncludeParentMessageInfo.

        Parameters:
        includeParentMessageText - If true the queried result will be returned with parent message's text for reply messages.
      • setIncludePollDetails

         void setIncludePollDetails(boolean includePollDetails)

        Determines whether to include the poll of the returned messages in the results.Internally, this will be set on setIncludePollDetails.

        Parameters:
        includePollDetails - If true the queried result will be returned with poll.
      • load

         synchronized void load(int limit, boolean reverse, PreviousMessageListQuery.MessageListQueryResult handler)

        Requests query result for the previous messages. The queried result is passed to handler as list.

        Parameters:
        limit - Maximum number of previous messages to load.
        reverse - If true the queried result will be returned by creation time descending order.
        handler - Callback handler.
      • getLimit

         int getLimit()

        Returns the maximum number of messages per page.

      • shouldReverse

         boolean shouldReverse()

        Returns whether the results should be reversed.

      • isIncludeThreadInfo

         boolean isIncludeThreadInfo()

        Returns whether to include the thread information of the returned messages in the results when the results contain parent messages.Can also be checked by getMessagePayloadFilter.

      • shouldShowSubchannelMessagesOnly

         boolean shouldShowSubchannelMessagesOnly()

        If set to true, only messages that belong to current user's subchannel is fetched.If set to false, all messages will be fetched. Default is false.Takes effect only when the requested channel is a dynamically partitioned open channel.