Class Muc


  • public final class Muc
    extends Object
    The implementation of the <x/> element in the http://jabber.org/protocol/muc namespace, which allows to enter a room.

    Usage

    
     // To create an empty element, e.g to indicate support in a presence
     Muc muc = Muc.empty();
    
     // To create an element with a password.
     Muc muc  = Muc.withPassword("secret");
     
    This class is immutable.
    See Also:
    XEP-0045: Multi-User Chat, XML Schema
    • Method Detail

      • empty

        public static Muc empty()
        Creates an empty element.
        Returns:
        The MUC element.
      • withPassword

        public static Muc withPassword​(String password)
        Creates an element with a password for the room.
        Parameters:
        password - The password.
        Returns:
        The MUC element.
      • withHistory

        public static Muc withHistory​(DiscussionHistory discussionHistory)
        Creates an element with a history element, indicating the user wishes to retrieve history.
        Parameters:
        discussionHistory - The history.
        Returns:
        The MUC element.
      • withPasswordAndHistory

        public static Muc withPasswordAndHistory​(String password,
                                                 DiscussionHistory discussionHistory)
        Creates an element with a history element and a password for the room.
        Parameters:
        password - The password.
        discussionHistory - The history.
        Returns:
        The MUC element.
      • getPassword

        public final String getPassword()
        Gets the password.
        Returns:
        The password.
      • getHistory

        public final DiscussionHistory getHistory()
        Gets the history.
        Returns:
        The history.