Smack

org.jivesoftware.smackx.muc
Class RoomInfo

java.lang.Object
  extended by 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).

Author:
Gaston Dombiak

Method Summary
 String getDescription()
          Returns the discovered description of the room.
 int getOccupantsCount()
          Returns the discovered number of occupants that are currently in the room.
 String getRoom()
          Returns the JID of the room whose information was discovered.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRoom

public String getRoom()
Returns the JID of the room whose information was discovered.

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

getDescription

public String getDescription()
Returns the discovered description of the room.

Returns:
the discovered description of the room.

getSubject

public String getSubject()
Returns the discovered subject of the room. The subject may be empty if the room does not have a subject.

Returns:
the discovered subject of the room.

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.

Smack

Copyright © 2003-2007 Jive Software.