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() |
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)
Sets the History that manages the amount of discussion history provided on
entering a room.
|
void |
setPassword(String password)
Sets the password to use when the room requires a password.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final String ELEMENT
public static final String NAMESPACE
public MUCInitialPresence()
public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML()
Element
public MUCInitialPresence.History getHistory()
public String getPassword()
public void setHistory(MUCInitialPresence.History history)
history
- that manages the amount of discussion history provided on
entering a room.public void setPassword(String password)
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