public final class Muc
extends java.lang.Object
The implementation of the <x/>
element in the http://jabber.org/protocol/muc
namespace, which allows to enter a room.
// 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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
|
Modifier and Type | Method and Description |
---|---|
static Muc |
empty()
Creates an empty element.
|
DiscussionHistory |
getHistory()
Gets the history.
|
java.lang.String |
getPassword()
Gets the password.
|
java.lang.String |
toString() |
static Muc |
withHistory(DiscussionHistory discussionHistory)
Creates an element with a history element, indicating the user wishes to retrieve history.
|
static Muc |
withPassword(java.lang.String password)
Creates an element with a password for the room.
|
static Muc |
withPasswordAndHistory(java.lang.String password,
DiscussionHistory discussionHistory)
Creates an element with a history element and a password for the room.
|
public static final java.lang.String NAMESPACE
public static Muc empty()
Creates an empty element.
public static Muc withPassword(java.lang.String password)
Creates an element with a password for the room.
password
- The password.public static Muc withHistory(DiscussionHistory discussionHistory)
Creates an element with a history element, indicating the user wishes to retrieve history.
discussionHistory
- The history.public static Muc withPasswordAndHistory(java.lang.String password, DiscussionHistory discussionHistory)
Creates an element with a history element and a password for the room.
password
- The password.discussionHistory
- The history.public final java.lang.String getPassword()
Gets the password.
public final DiscussionHistory getHistory()
Gets the history.
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.