public final class RoomInfo extends Object
DataForm with form type http://jabber.org/protocol/muc#roominfo, which can be used to retrieve MUC room info.
DataForm to retrieve standard data from it, use:
RoomInfo roomInfo = new RoomInfo(dataForm);
To build a form:
RoomInfo roomInfo = RoomInfo.builder()
.maxHistoryMessages(50)
.contacts(Arrays.asList(Jid.of("contact1"), Jid.of("contact2")))
.description("The place for all good witches!")
.language("en")
.ldapGroup("cn=witches,dc=shakespeare,dc=lit")
.logs(new URL("http://www.shakespeare.lit/chatlogs/coven/"))
.currentNumberOfOccupants(45)
.subject("Spells")
.changeSubjectAllowed(true)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
RoomInfo.Builder
A builder to build a room info form.
|
| Modifier and Type | Method and Description |
|---|---|
static RoomInfo.Builder |
builder() |
List<Jid> |
getContacts()
Gets the contact addresses (normally room owners).
|
Integer |
getCurrentNumberOfOccupants()
Gets the current number of occupants in the room.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
String |
getDescription()
Gets a short description.
|
Locale |
getLanguage()
Gets the natural language for room discussions.
|
String |
getLdapGroup()
Gets an associated LDAP group that defines
room membership; this should be an LDAP
Distinguished Name according to an
implementation-specific or
deployment-specific definition of a
group.
|
URL |
getLogs()
Gets an URL for archived discussion logs.
|
Integer |
getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
|
String |
getSubject()
Gets the current discussion topic.
|
boolean |
isChangeSubjectAllowed()
Indicates, whether the room subject can be modified by participants.
|
public static final String FORM_TYPE
public RoomInfo(DataForm dataForm)
public static RoomInfo.Builder builder()
public Integer getMaxHistoryMessages()
public List<Jid> getContacts()
public String getDescription()
public Locale getLanguage()
public String getLdapGroup()
public URL getLogs()
public Integer getCurrentNumberOfOccupants()
public String getSubject()
public boolean isChangeSubjectAllowed()
public DataForm getDataForm()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.