public class MUCInitialPresence extends Object implements ExtensionElement
The amount of discussion history provided on entering a room (perhaps because the user is on a low-bandwidth connection or is using a small-footprint client) could be managed by setting a configured History instance to the MUCInitialPresence instance.
setHistory(MUCInitialPresence.History)
Modifier and Type | Class and Description |
---|---|
static class |
MUCInitialPresence.History
The History class controls the number of characters or messages to receive
when entering a room.
|
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
Constructor and Description |
---|
MUCInitialPresence()
Deprecated.
use
MUCInitialPresence(String, int, int, int, Date) instead. |
MUCInitialPresence(String password,
int maxChars,
int maxStanzas,
int seconds,
Date since)
Construct a new MUC initial presence extension.
|
Modifier and Type | Method and Description |
---|---|
static MUCInitialPresence |
from(Stanza packet)
Retrieve the MUCInitialPresence PacketExtension from packet, if any.
|
String |
getElementName()
Returns the root element name.
|
static MUCInitialPresence |
getFrom(Stanza packet)
Deprecated.
use
from(Stanza) instead |
MUCInitialPresence.History |
getHistory()
Returns the history that manages the amount of discussion history provided on
entering a room.
|
String |
getNamespace()
Returns the root element XML namespace.
|
String |
getPassword()
Returns the password to use when the room requires a password.
|
void |
setHistory(MUCInitialPresence.History history)
Deprecated.
use
MUCInitialPresence(String, int, int, int, Date) instead. |
void |
setPassword(String password)
Deprecated.
use
MUCInitialPresence(String, int, int, int, Date) instead. |
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
public static final String ELEMENT
public static final String NAMESPACE
@Deprecated public MUCInitialPresence()
MUCInitialPresence(String, int, int, int, Date)
instead.public MUCInitialPresence(String password, int maxChars, int maxStanzas, int seconds, Date since)
password
- the optional password used to enter the room.maxChars
- the maximal count of characters of history to request.maxStanzas
- the maximal count of stanzas of history to request.seconds
- the last seconds since when to request history.since
- the date since when to request history.public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML(String enclosingNamespace)
Element
public MUCInitialPresence.History getHistory()
public String getPassword()
@Deprecated public void setHistory(MUCInitialPresence.History history)
MUCInitialPresence(String, int, int, int, Date)
instead.history
- that manages the amount of discussion history provided on
entering a room.@Deprecated public void setPassword(String password)
MUCInitialPresence(String, int, int, int, Date)
instead.password
- the password to use when the room requires a password.@Deprecated public static MUCInitialPresence getFrom(Stanza packet)
from(Stanza)
insteadpacket
- null
public static MUCInitialPresence from(Stanza packet)
packet
- null