Class MUCInitialPresence

  • All Implemented Interfaces:
    Element, ExtensionElement, FullyQualifiedElement, NamedElement, XmlLangElement

    public class MUCInitialPresence
    extends java.lang.Object
    implements 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)
    • Constructor Detail

      • 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

      • 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.
      • setPassword

        @Deprecated
        public void setPassword​(java.lang.String password)
        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​(Stanza packet)
        Deprecated.
        use from(Stanza) instead
        Retrieve the MUCInitialPresence PacketExtension from packet, if any.
        Parameters:
        packet - TODO javadoc me please
        Returns:
        the MUCInitialPresence PacketExtension or null
      • from

        public static MUCInitialPresence from​(Stanza packet)
        Retrieve the MUCInitialPresence PacketExtension from packet, if any.
        Parameters:
        packet - TODO javadoc me please
        Returns:
        the MUCInitialPresence PacketExtension or null