public final class RoomInfo
extends java.lang.Object
Represents a standardized 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 | Field and Description |
---|---|
static java.lang.String |
FORM_TYPE |
Modifier and Type | Method and Description |
---|---|
static RoomInfo.Builder |
builder() |
java.util.List<Jid> |
getContacts()
Gets the contact addresses (normally room owners).
|
java.lang.Integer |
getCurrentNumberOfOccupants()
Gets the current number of occupants in the room.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
java.lang.String |
getDescription()
Gets a short description.
|
java.util.Locale |
getLanguage()
Gets the natural language for room discussions.
|
java.lang.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.
|
java.net.URL |
getLogs()
Gets an URL for archived discussion logs.
|
java.lang.Integer |
getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
|
java.lang.String |
getSubject()
Gets the current discussion topic.
|
boolean |
isChangeSubjectAllowed()
Indicates, whether the room subject can be modified by participants.
|
public static final java.lang.String FORM_TYPE
public RoomInfo(DataForm dataForm)
public static RoomInfo.Builder builder()
public java.lang.Integer getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
public java.util.List<Jid> getContacts()
Gets the contact addresses (normally room owners).
public java.lang.String getDescription()
Gets a short description.
public java.util.Locale getLanguage()
Gets the natural language for room discussions.
public java.lang.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.
public java.net.URL getLogs()
Gets an URL for archived discussion logs.
public java.lang.Integer getCurrentNumberOfOccupants()
Gets the current number of occupants in the room.
public java.lang.String getSubject()
Gets the current discussion topic.
public boolean isChangeSubjectAllowed()
Indicates, whether the room subject can be modified by participants.
public DataForm getDataForm()
Gets the underlying data form.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.