public final class DiscussionHistory extends Object
// 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.| Modifier and Type | Method and Description |
|---|---|
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).
|
static DiscussionHistory |
forMaxMessages(int maxMessages)
Limit the total number of messages in the history to "X".
|
static DiscussionHistory |
forSeconds(int seconds)
Send only the messages received in the last "X" seconds.
|
static DiscussionHistory |
none()
Send no history.
|
static DiscussionHistory |
since(Instant date)
Send only the messages received since the date.
|
String |
toString() |
public static DiscussionHistory forMaxChars(int maxChars)
maxChars - The maximal character count.public static DiscussionHistory forMaxMessages(int maxMessages)
maxMessages - The maximal number of messages.public static DiscussionHistory forSeconds(int seconds)
seconds - The seconds.public static DiscussionHistory since(Instant date)
date - The date.public static DiscussionHistory none()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.