Class MessagesRequest


  • public class MessagesRequest
    extends java.lang.Object
    MessageRequest class helps developer to fetch list of messages based on different parameters set by developer
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MessagesRequest.MessagesRequestBuilder
      Builder class to set various parameters to fetch list of Messages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void fetchNext​(CometChat.CallbackListener<java.util.List<BaseMessage>> listener)
      Get list of next message based on the parameters specified in MessagesRequestBuilder class The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message.
      void fetchPrevious​(CometChat.CallbackListener<java.util.List<BaseMessage>> listener)
      Get list of previous message based on the parameters specified in MessagesRequestBuilder class.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • fetchPrevious

        public void fetchPrevious​(CometChat.CallbackListener<java.util.List<BaseMessage>> listener)
        Get list of previous message based on the parameters specified in MessagesRequestBuilder class. The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message.
        Parameters:
        listener - An object of the CallbackListener<List<BaseMessage>> class that helps inform the developer if the operation was successful or any error occurred.
        Since:
        v1
        See Also:
        MessagesRequest.MessagesRequestBuilder
      • fetchNext

        public void fetchNext​(CometChat.CallbackListener<java.util.List<BaseMessage>> listener)
        Get list of next message based on the parameters specified in MessagesRequestBuilder class The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message.
        Parameters:
        listener - An object of the CallbackListener<List<BaseMessage>> class that helps inform the developer if the operation was successful or any error occurred.
        Since:
        v1
        See Also:
        MessagesRequest.MessagesRequestBuilder
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object