Class DiscussionHistory


  • public final class DiscussionHistory
    extends Object
    The discussion history for a multi-user chat room, which can be requested when entering a room.

    Usage

    
     // To request discussion history for max. 65000 characters
     DiscussionHistory history = DiscussionHistory.forMaxChars(65000);
    
     // To request discussion history for max. the last 25 messages
     DiscussionHistory history = DiscussionHistory.forMaxMessages(25);
    
     // To request discussion history for the last 180 seconds
     DiscussionHistory history = DiscussionHistory.forSeconds(180);
    
     // To request no discussion history at all
     DiscussionHistory history = DiscussionHistory.none();
     
    This class is immutable.
    See Also:
    7.2.14 Discussion History, 7.2.15 Managing Discussion History
    • Method Detail

      • forMaxChars

        public static DiscussionHistory forMaxChars​(int maxChars)
        Limit the total number of characters in the history to "X" (where the character count is the characters of the complete XML stanzas, not only their XML character data).
        Parameters:
        maxChars - The maximal character count.
        Returns:
        The history.
      • forMaxMessages

        public static DiscussionHistory forMaxMessages​(int maxMessages)
        Limit the total number of messages in the history to "X".
        Parameters:
        maxMessages - The maximal number of messages.
        Returns:
        The history.
      • forSeconds

        public static DiscussionHistory forSeconds​(int seconds)
        Send only the messages received in the last "X" seconds.
        Parameters:
        seconds - The seconds.
        Returns:
        The history.
      • since

        public static DiscussionHistory since​(Instant date)
        Send only the messages received since the date.
        Parameters:
        date - The date.
        Returns:
        The history.
      • none

        public static DiscussionHistory none()
        Send no history.
        Returns:
        The history.