Class MUCInitialPresence
- java.lang.Object
-
- org.jivesoftware.smackx.muc.packet.MUCInitialPresence
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element
,org.jivesoftware.smack.packet.ExtensionElement
,org.jivesoftware.smack.packet.FullyQualifiedElement
,org.jivesoftware.smack.packet.NamedElement
,org.jivesoftware.smack.packet.XmlLangElement
public class MUCInitialPresence extends java.lang.Object implements org.jivesoftware.smack.packet.ExtensionElement
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:
setHistory(MUCInitialPresence.History)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MUCInitialPresence.History
The History class controls the number of characters or messages to receive when entering a room.
-
Constructor Summary
Constructors Constructor Description MUCInitialPresence()
Deprecated.useMUCInitialPresence(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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MUCInitialPresence
from(org.jivesoftware.smack.packet.Stanza packet)
Retrieve the MUCInitialPresence PacketExtension from packet, if any.java.lang.String
getElementName()
static MUCInitialPresence
getFrom(org.jivesoftware.smack.packet.Stanza packet)
Deprecated.usefrom(Stanza)
insteadMUCInitialPresence.History
getHistory()
Returns the history that manages the amount of discussion history provided on entering a room.java.lang.String
getNamespace()
java.lang.String
getPassword()
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(java.lang.String password)
Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.org.jivesoftware.smack.util.XmlStringBuilder
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
MUCInitialPresence
@Deprecated public MUCInitialPresence()
Deprecated.useMUCInitialPresence(String, int, int, int, Date)
instead.Deprecated constructor.
-
MUCInitialPresence
public MUCInitialPresence(java.lang.String password, int maxChars, int maxStanzas, int seconds, java.util.Date since)
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 Detail
-
getElementName
public java.lang.String getElementName()
- Specified by:
getElementName
in interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceorg.jivesoftware.smack.packet.FullyQualifiedElement
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
- Specified by:
toXML
in interfaceorg.jivesoftware.smack.packet.Element
-
getHistory
public MUCInitialPresence.History 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
public java.lang.String 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 public void setHistory(MUCInitialPresence.History history)
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 public void setPassword(java.lang.String password)
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 public static MUCInitialPresence getFrom(org.jivesoftware.smack.packet.Stanza packet)
Deprecated.usefrom(Stanza)
insteadRetrieve the MUCInitialPresence PacketExtension from packet, if any.- Parameters:
packet
- TODO javadoc me please- Returns:
- the MUCInitialPresence PacketExtension or
null
-
from
public static MUCInitialPresence from(org.jivesoftware.smack.packet.Stanza packet)
Retrieve the MUCInitialPresence PacketExtension from packet, if any.- Parameters:
packet
- TODO javadoc me please- Returns:
- the MUCInitialPresence PacketExtension or
null
-
-