Class MessagesQueryParams
-
- All Implemented Interfaces:
public final class MessagesQueryParamsHistory 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 }
-
-
Field Summary
Fields Modifier and Type Field Description private LongstartTimeprivate BooleanisAscendingprivate IntegerpageSizeprivate final ChannelIdentifierchannelIdentifier
-
Constructor Summary
Constructors Constructor Description MessagesQueryParams(ChannelIdentifier channelIdentifier)
-
Method Summary
Modifier and Type Method Description final LonggetStartTime()Start timestamp (milliseconds) for the query. final UnitsetStartTime(Long startTime)Start timestamp (milliseconds) for the query. final BooleanisAscending()Whether ascending by time (From Old to New). final UnitsetAscending(Boolean isAscending)Whether ascending by time (From Old to New). final IntegergetPageSize()Query count per page, Default 20. final UnitsetPageSize(Integer pageSize)Query count per page, Default 20. final ChannelIdentifiergetChannelIdentifier()StringtoString()-
-
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.
-
getChannelIdentifier
final ChannelIdentifier getChannelIdentifier()
-
toString
String toString()
-
-
-
-