Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.muc
Class HistoryRequest

java.lang.Object
  extended by org.jivesoftware.openfire.muc.HistoryRequest

public class HistoryRequest
extends Object

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
HistoryRequest(org.dom4j.Element userFragment)
           
 
Method Summary
 int getMaxChars()
          Returns the total number of characters to receive in the history.
 int getMaxStanzas()
          Returns the total number of messages to receive in the history.
 int getSeconds()
          Returns the number of seconds to use to filter the messages received during that time.
 Date getSince()
          Returns the since date to use to filter the messages received during that time.
 void sendHistory(LocalMUCRole joinRole, MUCRoomHistory roomHistory)
          Sends the smallest amount of traffic that meets any combination of the requested criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryRequest

public HistoryRequest(org.dom4j.Element userFragment)
Method Detail

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

public Date 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

public void sendHistory(LocalMUCRole joinRole,
                        MUCRoomHistory roomHistory)
Sends the smallest amount of traffic that meets any combination of the requested criteria.

Parameters:
joinRole - the user that will receive the history.
roomHistory - the history of the room.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.