Class RemoteHistoryMsgOption

    • Constructor Detail

      • RemoteHistoryMsgOption

        RemoteHistoryMsgOption()
      • 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.
      • 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.

      • setIncludeLocalExistMessage

         void setIncludeLocalExistMessage(boolean includeLocalExistMessage)

        Sets whether duplicate message retrieval is required.

        Parameters:
        includeLocalExistMessage - Indicates whether duplicate message retrieval is required.