Package org.jivesoftware.openfire.muc
Class HistoryRequest
java.lang.Object
org.jivesoftware.openfire.muc.HistoryRequest
Represents the amount of history requested by an occupant while joining a room. There are
basically four ways to control the amount of history that a user may receive. Those are: limit
by the maximum limit of characters to receive, limit by a maximum number of stanzas to receive,
limit to receive only the messages before a given date or of the last X seconds.
A user may combine any of these four methods. The idea is that the user will receive the smallest amount of traffic so the amount of history to collect will stop as soon as any of the requested method has reached its limit.
- Author:
- Gaston Dombiak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the total number of characters to receive in the history.intReturns the total number of messages to receive in the history.intReturns the number of seconds to use to filter the messages received during that time.getSince()Returns the since date to use to filter the messages received during that time.voidsendHistory(MUCOccupant occupant, MUCRoomHistory roomHistory) Sends the smallest amount of traffic that meets any combination of the requested criteria.
-
Constructor Details
-
HistoryRequest
public HistoryRequest(org.dom4j.Element userFragment)
-
-
Method Details
-
getMaxChars
public int getMaxChars()Returns the total number of characters to receive in the history.- Returns:
- total number of characters to receive in the history.
-
getMaxStanzas
public int getMaxStanzas()Returns the total number of messages to receive in the history.- Returns:
- the total number of messages to receive in the history.
-
getSeconds
public int getSeconds()Returns the number of seconds to use to filter the messages received during that time. In other words, only the messages received in the last "X" seconds will be included in the history.- Returns:
- the number of seconds to use to filter the messages received during that time.
-
getSince
Returns the since date to use to filter the messages received during that time. In other words, only the messages received since the datetime specified will be included in the history.- Returns:
- the since date to use to filter the messages received during that time.
-
sendHistory
Sends the smallest amount of traffic that meets any combination of the requested criteria.- Parameters:
occupant- the user that will receive the history.roomHistory- the history of the room.
-