Package rocks.xmpp.extensions.muc.model
Class DiscussionHistory
- java.lang.Object
-
- rocks.xmpp.extensions.muc.model.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
This class is immutable.// 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();
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DiscussionHistoryforMaxChars(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).static DiscussionHistoryforMaxMessages(int maxMessages)Limit the total number of messages in the history to "X".static DiscussionHistoryforSeconds(int seconds)Send only the messages received in the last "X" seconds.static DiscussionHistorynone()Send no history.static DiscussionHistorysince(Instant date)Send only the messages received since the date.StringtoString()
-
-
-
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.
-
-