Class RoomInfo

java.lang.Object
org.jivesoftware.smackx.muc.RoomInfo

public class RoomInfo extends Object
Represents the room information that was discovered using Service Discovery. It's possible to obtain information about a room before joining the room but only for rooms that are public (i.e. rooms that may be discovered).
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns Contact Addresses as JIDs, if such are reported.
    Returns the discovered description of the room.
    Returns the form included in the extended disco info result or null if no such form was sent.
    Returns the natural language of the room discussion, or null.
    Returns an associated LDAP group that defines room membership.
    Returns the URL where archived discussion logs can be found or null if there is no such URL.
    int
    Returns the maximum number of history messages which are returned by the room or '-1' if this property is not reported by the room.
    Returns the room name.
    int
    Returns the discovered number of occupants that are currently in the room.
    An associated pubsub node for this room or null.
    Returns the JID of the room whose information was discovered.
    Returns the discovered subject of the room.
    boolean
    Returns true if the room has restricted the access so that only members may enter the room.
    boolean
    Returns true if the room enabled only participants to speak.
    boolean
    Returns true if presence packets will include the JID of every occupant.
    boolean
    Returns true if users must provide a valid password in order to join the room.
    boolean
    Returns true if the room will persist after the last occupant have left the room.
    Returns an Boolean instance with the value 'true' if the subject can be modified by the room participants, 'false' if not, or null if this information is reported by the room.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getRoom

      Returns the JID of the room whose information was discovered.
      Returns:
      the JID of the room whose information was discovered.
    • getName

      public String getName()
      Returns the room name.

      The name returned here was provided as value of the name attribute of the returned identity within the disco#info result.

      Returns:
      the name of the room.
    • getDescription

      Returns the discovered description of the room.

      The description returned by this method was provided as value of the form field of the extended disco info result. It may be null.

      Returns:
      the discovered description of the room or null
    • getSubject

      public String getSubject()
      Returns the discovered subject of the room. The subject may be null if the room does not have a subject.
      Returns:
      the discovered subject of the room or null
    • getOccupantsCount

      public int getOccupantsCount()
      Returns the discovered number of occupants that are currently in the room. If this information was not discovered (i.e. the server didn't send it) then a value of -1 will be returned.
      Returns:
      the number of occupants that are currently in the room or -1 if that information was not provided by the server.
    • isMembersOnly

      public boolean isMembersOnly()
      Returns true if the room has restricted the access so that only members may enter the room.
      Returns:
      true if the room has restricted the access so that only members may enter the room.
    • isModerated

      public boolean isModerated()
      Returns true if the room enabled only participants to speak. Occupants with a role of visitor won't be able to speak in the room.
      Returns:
      true if the room enabled only participants to speak.
    • isNonanonymous

      public boolean isNonanonymous()
      Returns true if presence packets will include the JID of every occupant.
      Returns:
      true if presence packets will include the JID of every occupant.
    • isPasswordProtected

      public boolean isPasswordProtected()
      Returns true if users must provide a valid password in order to join the room.
      Returns:
      true if users must provide a valid password in order to join the room.
    • isPersistent

      public boolean isPersistent()
      Returns true if the room will persist after the last occupant have left the room.
      Returns:
      true if the room will persist after the last occupant have left the room.
    • getMaxHistoryFetch

      public int getMaxHistoryFetch()
      Returns the maximum number of history messages which are returned by the room or '-1' if this property is not reported by the room.
      Returns:
      the maximum number of history messages or '-1'
    • getContactJids

      Returns Contact Addresses as JIDs, if such are reported.
      Returns:
      a list of contact addresses for this room.
    • getLang

      public String getLang()
      Returns the natural language of the room discussion, or null.
      Returns:
      the language of the room discussion or null.
    • getLdapGroup

      public String getLdapGroup()
      Returns an associated LDAP group that defines room membership. The value should be an LDAP Distinguished Name according to an implementation-specific or deployment-specific definition of a group.
      Returns:
      an associated LDAP group or null
    • isSubjectModifiable

      Returns an Boolean instance with the value 'true' if the subject can be modified by the room participants, 'false' if not, or null if this information is reported by the room.
      Returns:
      an boolean that is true if the subject can be modified by participants or null
    • getPubSub

      public String getPubSub()
      An associated pubsub node for this room or null.
      Returns:
      the associated pubsub node or null
    • getLogsUrl

      public URL getLogsUrl()
      Returns the URL where archived discussion logs can be found or null if there is no such URL.
      Returns:
      the URL where archived logs can be found or null
    • getForm

      public DataForm getForm()
      Returns the form included in the extended disco info result or null if no such form was sent.
      Returns:
      The room info form or null
      See Also: