Class RoomInfo


  • public class RoomInfo
    extends java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<EntityBareJid> getContactJids()
      Returns Contact Addresses as JIDs, if such are reported.
      java.lang.String getDescription()
      Returns the discovered description of the room.
      DataForm getForm()
      Returns the form included in the extended disco info result or null if no such form was sent.
      java.lang.String getLang()
      Returns the natural language of the room discussion, or null.
      java.lang.String getLdapGroup()
      Returns an associated LDAP group that defines room membership.
      java.net.URL getLogsUrl()
      Returns the URL where archived discussion logs can be found or null if there is no such URL.
      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.
      java.lang.String getName()
      Returns the room name.
      int getOccupantsCount()
      Returns the discovered number of occupants that are currently in the room.
      java.lang.String getPubSub()
      An associated pubsub node for this room or null.
      EntityBareJid getRoom()
      Returns the JID of the room whose information was discovered.
      java.lang.String getSubject()
      Returns the discovered subject of the room.
      boolean isMembersOnly()
      Returns true if the room has restricted the access so that only members may enter the room.
      boolean isModerated()
      Returns true if the room enabled only participants to speak.
      boolean isNonanonymous()
      Returns true if presence packets will include the JID of every occupant.
      boolean isPasswordProtected()
      Returns true if users musy provide a valid password in order to join the room.
      boolean isPersistent()
      Returns true if the room will persist after the last occupant have left the room.
      java.lang.Boolean 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.
      • Methods inherited from class java.lang.Object

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

      • getRoom

        public EntityBareJid getRoom()
        Returns the JID of the room whose information was discovered.
        Returns:
        the JID of the room whose information was discovered.
      • getName

        public java.lang.String getName()
        Returns the room name.

        The name returnd 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

        public java.lang.String 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 java.lang.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 musy provide a valid password in order to join the room.
        Returns:
        true if users musy 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

        public java.util.List<EntityBareJidgetContactJids()
        Returns Contact Addresses as JIDs, if such are reported.
        Returns:
        a list of contact addresses for this room.
      • getLang

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

        public java.lang.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

        public java.lang.Boolean 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 java.lang.String getPubSub()
        An associated pubsub node for this room or null.
        Returns:
        the associated pubsub node or null
      • getLogsUrl

        public java.net.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