Class MUCInitialPresence
java.lang.Object
org.jivesoftware.smackx.muc.packet.MUCInitialPresence
- All Implemented Interfaces:
Element
,ExtensionElement
,NamedElement
,XmlElement
,XmlLangElement
Represents extended presence information whose sole purpose is to signal the ability of
the occupant to speak the MUC protocol when joining a room. If the room requires a password
then the MUCInitialPresence should include one.
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.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The History class controls the number of characters or messages to receive when entering a room. -
Field Summary
-
Constructor Summary
ConstructorDescriptionDeprecated.MUCInitialPresence
(String password, int maxChars, int maxStanzas, int seconds, Date since) Construct a new MUC initial presence extension. -
Method Summary
Modifier and TypeMethodDescriptionstatic MUCInitialPresence
Retrieve the MUCInitialPresence PacketExtension from packet, if any.Returns the root element name.static MUCInitialPresence
Deprecated.usefrom(Stanza)
insteadReturns the history that manages the amount of discussion history provided on entering a room.Returns the root element XML namespace.Returns the password to use when the room requires a password.void
setHistory
(MUCInitialPresence.History history) Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.void
setPassword
(String password) Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
NAMESPACE
- See Also:
-
QNAME
-
-
Constructor Details
-
MUCInitialPresence
Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.Deprecated constructor. -
MUCInitialPresence
Construct a new MUC initial presence extension.- Parameters:
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.
-
-
Method Details
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
toXML
-
getHistory
Returns the history that manages the amount of discussion history provided on entering a room.- Returns:
- the history that manages the amount of discussion history provided on entering a room.
-
getPassword
Returns the password to use when the room requires a password.- Returns:
- the password to use when the room requires a password.
-
setHistory
Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.Sets the History that manages the amount of discussion history provided on entering a room.- Parameters:
history
- that manages the amount of discussion history provided on entering a room.
-
setPassword
Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.Sets the password to use when the room requires a password.- Parameters:
password
- the password to use when the room requires a password.
-
getFrom
Deprecated.usefrom(Stanza)
insteadRetrieve the MUCInitialPresence PacketExtension from packet, if any.- Parameters:
packet
- TODO javadoc me please- Returns:
- the MUCInitialPresence PacketExtension or
null
-
from
Retrieve the MUCInitialPresence PacketExtension from packet, if any.- Parameters:
packet
- TODO javadoc me please- Returns:
- the MUCInitialPresence PacketExtension or
null
-
MUCInitialPresence(String, int, int, int, Date)
instead.