Package rocks.xmpp.extensions.muc.model
Class Muc
- java.lang.Object
-
- rocks.xmpp.extensions.muc.model.Muc
-
public final class Muc extends Object
The implementation of the<x/>element in thehttp://jabber.org/protocol/mucnamespace, which allows to enter a room.Usage
This class is immutable.// 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");- See Also:
- XEP-0045: Multi-User Chat, XML Schema
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Mucempty()Creates an empty element.DiscussionHistorygetHistory()Gets the history.StringgetPassword()Gets the password.StringtoString()static MucwithHistory(DiscussionHistory discussionHistory)Creates an element with a history element, indicating the user wishes to retrieve history.static MucwithPassword(String password)Creates an element with a password for the room.static MucwithPasswordAndHistory(String password, DiscussionHistory discussionHistory)Creates an element with a history element and a password for the room.
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
http://jabber.org/protocol/muc- See Also:
- Constant Field Values
-
-
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.
-
-