public class MUCInitialPresence extends java.lang.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 java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
MUCInitialPresence()
Deprecated.
use
MUCInitialPresence(String, int, int, int, Date) instead. |
MUCInitialPresence(java.lang.String password,
int maxChars,
int maxStanzas,
int seconds,
java.util.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.
|
java.lang.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.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
java.lang.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(java.lang.String password)
Deprecated.
use
MUCInitialPresence(String, int, int, int, Date) instead. |
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
@Deprecated public MUCInitialPresence()
MUCInitialPresence(String, int, int, int, Date) instead.public MUCInitialPresence(java.lang.String password, int maxChars, int maxStanzas, int seconds, java.util.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 java.lang.String getElementName()
NamedElementgetElementName in interface NamedElementpublic java.lang.String getNamespace()
ExtensionElementgetNamespace in interface ExtensionElementpublic XmlStringBuilder toXML()
Elementpublic MUCInitialPresence.History getHistory()
public java.lang.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(java.lang.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 - nullpublic static MUCInitialPresence from(Stanza packet)
packet - null