| Package | com.smartfoxserver.v2.entities | 
| Interface | public interface Room | 
| Implementors | SFSRoom | 
In the SmartFoxServer 2X client API this interface is implemented by the SFSRoom class. Read the class description for additional informations.
See also
| Property | Defined By | ||
|---|---|---|---|
| capacity : int [read-only] 
		 Returns the maximum amount of users, including spectators, that can be contained in this Room. | Room | ||
| groupId : String [read-only]  
		 Returns the Room Group name. | Room | ||
| id : int [read-only] 
		 Indicates the id of this Room. | Room | ||
| isGame : Boolean 
		 Indicates whether this is a Game Room or not. | Room | ||
| isHidden : Boolean 
		 Indicates whether this Room is hidden or not. | Room | ||
| isJoined : Boolean 
		 Indicates whether the client joined this Room or not. | Room | ||
| isPasswordProtected : Boolean 
		 Indicates whether this Room requires a password to be joined or not. | Room | ||
| maxSpectators : int 
		 Returns the maximum number of spectators allowed in this Room (Game Rooms only). | Room | ||
| maxUsers : int 
		 Returns the maximum number of users allowed in this Room. | Room | ||
| name : String 
		 Indicates the name of this Room. | Room | ||
| playerList : Array [read-only] 
		 Returns a list of User objects representing the players currently inside this Room (Game Rooms only). | Room | ||
| properties : Object  
		 Defines a generic utility object that can be used to store custom Room data. | Room | ||
| roomManager : IRoomManager 
		 Returns a reference to the Room Manager which manages this Room. | Room | ||
| spectatorCount : int 
		 Returns the current number of spectators in this Room (Game Rooms only). | Room | ||
| spectatorList : Array [read-only] 
		 Returns a list of User objects representing the spectators currently inside this Room (Game Rooms only). | Room | ||
| userCount : int 
		 Returns the current number of users in this Room. | Room | ||
| userList : Array [read-only] 
		 Returns a list of User objects representing all the users currently inside this Room. | Room | ||
| Method | Defined By | ||
|---|---|---|---|
| containsUser(user:User):Boolean 
		 Indicates whether the specified user is currently inside this Room or not. | Room | ||
| containsVariable(name:String):Boolean 
		 Indicates whether this Room has the specified Room Variable set or not. | Room | ||
| getUserById(id:int):User 
		 Retrieves a User object from its id property. | Room | ||
| getUserByName(name:String):User 
		 Retrieves a User object from its name property. | Room | ||
| getVariable(name:String):RoomVariable 
		 Retrieves a Room Variable from its name. | Room | ||
| getVariables():Array 
		 Retrieves all the Room Variables of this Room. | Room | ||
| capacity | property | 
capacity:int  [read-only] Returns the maximum amount of users, including spectators, that can be contained in this Room.
    public function get capacity():int| groupId | property | 
groupId:String  [read-only] Returns the Room Group name. Each Group is identified by a unique string (its name or id) and it represents a different "container" for Rooms.
Room Groups enable developers to organize Rooms under different types or categories and let clients select only those Groups they are interested in, in order to receive their events only. This is done via the SubscribeRoomGroupRequest and UnsubscribeRoomGroupRequest requests.
 The default value is default.
    public function get groupId():StringSee also
| id | property | 
id:int  [read-only] Indicates the id of this Room. It is unique and it is generated by the server when the Room is created.
    public function get id():int| isGame | property | 
isGame:BooleanIndicates whether this is a Game Room or not.
NOTE: setting the isGame property manually has no effect on the server and can disrupt the API functioning. This flag must be set when creating the Room.
    public function get isGame():Boolean    public function set isGame(value:Boolean):void| isHidden | property | 
isHidden:BooleanIndicates whether this Room is hidden or not. This is a utility flag that can be used by developers to hide certain Rooms from the interface of their application.
NOTE: setting the isHidden property manually has no effect on the server and can disrupt the API functioning. This flag must be set when creating the Room.
    public function get isHidden():Boolean    public function set isHidden(value:Boolean):void| isJoined | property | 
isJoined:BooleanIndicates whether the client joined this Room or not.
NOTE: setting the isJoined property manually has no effect on the server and can disrupt the API functioning. Use the JoinRoomRequest request to join a new Room instead.
    public function get isJoined():Boolean    public function set isJoined(value:Boolean):voidSee also
| isPasswordProtected | property | 
isPasswordProtected:BooleanIndicates whether this Room requires a password to be joined or not.
NOTE: setting the isPasswordProtected property manually has no effect on the server and can disrupt the API functioning. This flag depends on the Room's password set when the Room is created or by means of the ChangeRoomPasswordStateRequest request.
    public function get isPasswordProtected():Boolean    public function set isPasswordProtected(value:Boolean):voidSee also
| maxSpectators | property | 
maxSpectators:intReturns the maximum number of spectators allowed in this Room (Game Rooms only).
NOTE: setting the maxSpectators property manually has no effect on the server and can disrupt the API functioning. This flag must be set when creating the Game Room.
    public function get maxSpectators():int    public function set maxSpectators(value:int):void| maxUsers | property | 
maxUsers:intReturns the maximum number of users allowed in this Room. In case of Game Rooms, this is the maximum number of players.
NOTE: setting the maxUsers property manually has no effect on the server and can disrupt the API functioning. This flag must be set when creating the Room.
    public function get maxUsers():int    public function set maxUsers(value:int):void| name | property | 
name:StringIndicates the name of this Room. Two Rooms in the same Zone can't have the same name.
NOTE: setting the name property manually has no effect on the server and can disrupt the API functioning. Use the ChangeRoomNameRequest request instead.
    public function get name():String    public function set name(value:String):voidSee also
| playerList | property | 
playerList:Array  [read-only] Returns a list of User objects representing the players currently inside this Room (Game Rooms only).
    public function get playerList():Array| properties | property | 
properties:ObjectDefines a generic utility object that can be used to store custom Room data. The values added to this object are for client-side use only and are never transmitted to the server or to the other clients.
    public function get properties():Object    public function set properties(value:Object):void| roomManager | property | 
roomManager:IRoomManagerReturns a reference to the Room Manager which manages this Room.
NOTE: setting the roomManager property manually has no effect on the server and can disrupt the API functioning.
    public function get roomManager():IRoomManager    public function set roomManager(value:IRoomManager):void| spectatorCount | property | 
spectatorCount:intReturns the current number of spectators in this Room (Game Rooms only).
NOTE: setting the spectatorCount property manually has no effect on the server and can disrupt the API functioning. This flag depends on the Room state.
    public function get spectatorCount():int    public function set spectatorCount(value:int):void| spectatorList | property | 
spectatorList:Array  [read-only] Returns a list of User objects representing the spectators currently inside this Room (Game Rooms only).
    public function get spectatorList():Array| userCount | property | 
userCount:intReturns the current number of users in this Room. In case of Game Rooms, this is the number of players.
NOTE: setting the userCount property manually has no effect on the server and can disrupt the API functioning. This flag depends on the Room state.
    public function get userCount():int    public function set userCount(value:int):void| userList | property | 
userList:Array  [read-only] Returns a list of User objects representing all the users currently inside this Room.
    public function get userList():Array| containsUser | () | method | 
 public function containsUser(user:User):BooleanIndicates whether the specified user is currently inside this Room or not.
Parameters
| user:User— The User object representing the user whose presence in this Room must be checked. | 
| Boolean—trueif the user is inside this Room;falseotherwise. | 
| containsVariable | () | method | 
 public function containsVariable(name:String):BooleanIndicates whether this Room has the specified Room Variable set or not.
Parameters
| name:String— The name of the Room Variable whose existance in this Room must be checked. | 
| Boolean—trueif a Room Variable with the passed name exists in this Room. | 
| getUserById | () | method | 
 public function getUserById(id:int):UserRetrieves a User object from its id property.
Parameters
| id:int— The id of the user to be retrieved. | 
| User— The User object representing the user, ornullif no user with the passed id exists in this Room. | 
See also
| getUserByName | () | method | 
 public function getUserByName(name:String):UserRetrieves a User object from its name property.
Parameters
| name:String— The name of the user to be found. | 
| User— The User object representing the user, ornullif no user with the passed name exists in this Room. | 
See also
| getVariable | () | method | 
 public function getVariable(name:String):RoomVariableRetrieves a Room Variable from its name.
Parameters
| name:String— The name of the Room Variable to be retrieved. | 
| RoomVariable— The RoomVariable object representing the Room Variable, ornullif no Room Variable with the passed name exists in this Room. | 
See also
| getVariables | () | method | 
 public function getVariables():ArrayRetrieves all the Room Variables of this Room.
Returns| Array— The list of RoomVariable objects associated with this Room. | 
See also