Interface ThreadQueryListener
-
- All Implemented Interfaces:
public interface ThreadQueryListenerListener for reply queries.
-
-
Method Summary
Modifier and Type Method Description Result<Unit>onGetRepliesPrecondition(String parentId)Runs precondition check for ChatClient.getReplies, ChatClient.getNewerReplies and ChatClient.getRepliesMore. abstract UnitonGetRepliesRequest(String parentId, Integer limit)Runs side effect before the request is launched. abstract UnitonGetRepliesResult(Result<List<Message>> result, String parentId, Integer limit)Runs this function on the result of the ChatClient.getReplies request. abstract UnitonGetRepliesMoreRequest(String parentId, String firstId, Integer limit)Runs side effect before the request is launched. abstract UnitonGetRepliesMoreResult(Result<List<Message>> result, String parentId, String firstId, Integer limit)Runs this function on the result of the ChatClient.getRepliesMore request. abstract UnitonGetNewerRepliesRequest(String parentId, Integer limit, String lastId)Runs side effect before the request is launched. abstract UnitonGetNewerRepliesResult(Result<List<Message>> result, String parentId, Integer limit, String lastId)Runs this function on the result of the ChatClient.getNewerReplies request. -
-
Method Detail
-
onGetRepliesPrecondition
Result<Unit> onGetRepliesPrecondition(String parentId)
Runs precondition check for ChatClient.getReplies, ChatClient.getNewerReplies and ChatClient.getRepliesMore. If it returns Result.Success then the request is run otherwise it returns Result.Failure and no request is made.
- Parameters:
parentId- The id of the parent message.- Returns:
Result.Success if the precondition is met, Result.Failure otherwise.
-
onGetRepliesRequest
abstract Unit onGetRepliesRequest(String parentId, Integer limit)
Runs side effect before the request is launched.
-
onGetRepliesResult
abstract Unit onGetRepliesResult(Result<List<Message>> result, String parentId, Integer limit)
Runs this function on the result of the ChatClient.getReplies request.
-
onGetRepliesMoreRequest
abstract Unit onGetRepliesMoreRequest(String parentId, String firstId, Integer limit)
Runs side effect before the request is launched.
-
onGetRepliesMoreResult
abstract Unit onGetRepliesMoreResult(Result<List<Message>> result, String parentId, String firstId, Integer limit)
Runs this function on the result of the ChatClient.getRepliesMore request.
-
onGetNewerRepliesRequest
abstract Unit onGetNewerRepliesRequest(String parentId, Integer limit, String lastId)
Runs side effect before the request is launched.
-
onGetNewerRepliesResult
abstract Unit onGetNewerRepliesResult(Result<List<Message>> result, String parentId, Integer limit, String lastId)
Runs this function on the result of the ChatClient.getNewerReplies request.
-
-
-
-