Package | com.smartfoxserver.v2.entities.managers |
Class | public class SFSRoomManager |
Inheritance | SFSRoomManager Object |
Implements | IRoomManager |
See also
Method | Defined By | ||
---|---|---|---|
SFSRoomManager(sfs:SmartFox)
Creates a new SFSRoomManager instance. | SFSRoomManager | ||
containsGroup(groupId:String):Boolean
Indicates whether the specified Group has been subscribed by the client or not. | SFSRoomManager | ||
containsRoom(idOrName:*):Boolean
Indicates whether a Room exists in the Rooms list or not. | SFSRoomManager | ||
containsRoomInGroup(idOrName:*, groupId:String):Boolean
Indicates whether the Rooms list contains a Room belonging to the specified Group or not. | SFSRoomManager | ||
getJoinedRooms():Array
Returns a list of Rooms currently joined by the client. | SFSRoomManager | ||
getRoomById(id:int):Room
Retrieves a Room object from its id. | SFSRoomManager | ||
getRoomByName(name:String):Room
Retrieves a Room object from its name. | SFSRoomManager | ||
getRoomCount():int
Returns the current number of Rooms in the Rooms list. | SFSRoomManager | ||
getRoomGroups():Array
Returns the names of Room Groups currently subscribed by the client. | SFSRoomManager | ||
getRoomList():Array
Returns a list of Rooms currently "known" by the client. | SFSRoomManager | ||
getRoomListFromGroup(groupId:String):Array
Retrieves the list of Rooms which are part of the specified Room Group. | SFSRoomManager | ||
getUserRooms(user:User):Array
Retrieves a list of Rooms joined by the specified user. | SFSRoomManager |
SFSRoomManager | () | Constructor |
public function SFSRoomManager(sfs:SmartFox)
Creates a new SFSRoomManager instance.
NOTE: developers never instantiate a SFSRoomManager manually: this is done by the SmartFoxServer 2X API internally. A reference to the existing instance can be retrieved using the SmartFox.roomManager property.
Parameterssfs:SmartFox — An instance of the SmartFoxServer 2X client API main SmartFox class.
|
See also
containsGroup | () | method |
public function containsGroup(groupId:String):Boolean
Indicates whether the specified Group has been subscribed by the client or not.
Parameters
groupId:String — The name of the Group.
|
Boolean — true if the client subscribed the passed Group.
|
containsRoom | () | method |
public function containsRoom(idOrName:*):Boolean
Indicates whether a Room exists in the Rooms list or not.
Parameters
idOrName:* — The id or name of the Room object whose presence in the Rooms list is to be tested.
|
Boolean — true if the passed Room exists in the Rooms list.
|
containsRoomInGroup | () | method |
public function containsRoomInGroup(idOrName:*, groupId:String):Boolean
Indicates whether the Rooms list contains a Room belonging to the specified Group or not.
Parameters
idOrName:* — The id or name of the Room object whose presence in the Rooms list is to be tested.
| |
groupId:String — The name of the Group to which the specified Room must belong.
|
Boolean — true if the Rooms list contains the passed Room and it belongs to the specified Group.
|
getJoinedRooms | () | method |
public function getJoinedRooms():Array
Returns a list of Rooms currently joined by the client.
ReturnsArray — The list of Room objects representing the Rooms currently joined by the client.
|
getRoomById | () | method |
public function getRoomById(id:int):Room
Retrieves a Room object from its id.
Parameters
id:int — The id of the Room.
|
Room — An object representing the requested Room; null if no Room object with the passed id exists in the Rooms list.
|
getRoomByName | () | method |
public function getRoomByName(name:String):Room
Retrieves a Room object from its name.
Parameters
name:String — The name of the Room.
|
Room — An object representing the requested Room; null if no Room object with the passed name exists in the Rooms list.
|
getRoomCount | () | method |
public function getRoomCount():int
Returns the current number of Rooms in the Rooms list.
Returnsint — The number of Rooms in the Rooms list.
|
getRoomGroups | () | method |
public function getRoomGroups():Array
Returns the names of Room Groups currently subscribed by the client.
NOTE: at login time, the client automatically subscribes all the Room Groups specified in the Zone's Default Room Groups setting.
ReturnsArray — A list of Room Group names.
|
getRoomList | () | method |
public function getRoomList():Array
Returns a list of Rooms currently "known" by the client. The list contains all the Rooms that are currently joined and all the Rooms belonging to the Room Groups that have been subscribed.
NOTE: at login time, the client automatically subscribes all the Room Groups specified in the Zone's Default Room Groups setting.
ReturnsArray — The list of the available Room objects.
|
getRoomListFromGroup | () | method |
public function getRoomListFromGroup(groupId:String):Array
Retrieves the list of Rooms which are part of the specified Room Group.
Parameters
groupId:String — The name of the Group.
|
Array — The list of Room objects belonging to the passed Group.
|
getUserRooms | () | method |
public function getUserRooms(user:User):Array
Retrieves a list of Rooms joined by the specified user. The list contains only those Rooms "known" by the Room Manager; the user might have joined others the client is not aware of.
Parameters
user:User — A User object representing the user to look for in the current Rooms list.
|
Array — The list of Rooms joined by the passed user.
|