Class MessagesQueryParams

  • All Implemented Interfaces:

    
    public final class MessagesQueryParams
    
                        

    History message pagination query parameters.

    Used for ai.nexconn.chat.channel.BaseChannel.createMessagesQuery Create message Pagination query object.

    Usage Example:

    val params = MessagesQueryParams(channelIdentifier).apply {
        pageSize = 30
        isAscending = false
    }
    val query = BaseChannel.createMessagesQuery(params)
    query.loadNextPage { messages, error ->
        // Handle Result
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Long getStartTime() Start timestamp (milliseconds) for the query.
      final Unit setStartTime(Long startTime) Start timestamp (milliseconds) for the query.
      final Boolean isAscending() Whether ascending by time (From Old to New).
      final Unit setAscending(Boolean isAscending) Whether ascending by time (From Old to New).
      final Integer getPageSize() Query count per page, Default 20.
      final Unit setPageSize(Integer pageSize) Query count per page, Default 20.
      final ChannelIdentifier getChannelIdentifier()
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessagesQueryParams

        MessagesQueryParams(ChannelIdentifier channelIdentifier)
        Parameters:
        channelIdentifier - Target channel identifier
    • Method Detail

      • getStartTime

         final Long getStartTime()

        Start timestamp (milliseconds) for the query.

        Messages will be fetched starting from this timestamp based on the query direction. Default is 0, indicates From latest (Descending) or earliest (Ascending) message start.

      • setStartTime

         final Unit setStartTime(Long startTime)

        Start timestamp (milliseconds) for the query.

        Messages will be fetched starting from this timestamp based on the query direction. Default is 0, indicates From latest (Descending) or earliest (Ascending) message start.

      • isAscending

         final Boolean isAscending()

        Whether ascending by time (From Old to New).

        • true: Ascending, Get compared to reference message Update message

        • false: Descending (Default), Get compared to reference message earlier message

      • setAscending

         final Unit setAscending(Boolean isAscending)

        Whether ascending by time (From Old to New).

        • true: Ascending, Get compared to reference message Update message

        • false: Descending (Default), Get compared to reference message earlier message

      • getPageSize

         final Integer getPageSize()

        Query count per page, Default 20.

      • setPageSize

         final Unit setPageSize(Integer pageSize)

        Query count per page, Default 20.