Package | com.smartfoxserver.v2.entities.managers |
Interface | public interface IRoomManager |
Implementors | SFSRoomManager |
In the SmartFoxServer 2X client API this interface is implemented by the SFSRoomManager class. Read the class description for additional informations.
See also
Method | Defined By | ||
---|---|---|---|
containsGroup(groupId:String):Boolean
Indicates whether the specified Group has been subscribed by the client or not. | IRoomManager | ||
containsRoom(idOrName:*):Boolean
Indicates whether a Room exists in the Rooms list or not. | IRoomManager | ||
containsRoomInGroup(idOrName:*, groupId:String):Boolean
Indicates whether the Rooms list contains a Room belonging to the specified Group or not. | IRoomManager | ||
getJoinedRooms():Array
Returns a list of Rooms currently joined by the client. | IRoomManager | ||
getRoomById(id:int):Room
Retrieves a Room object from its id. | IRoomManager | ||
getRoomByName(name:String):Room
Retrieves a Room object from its name. | IRoomManager | ||
getRoomCount():int
Returns the current number of Rooms in the Rooms list. | IRoomManager | ||
getRoomGroups():Array
Returns the names of Room Groups currently subscribed by the client. | IRoomManager | ||
getRoomList():Array
Returns a list of Rooms currently "known" by the client. | IRoomManager | ||
getRoomListFromGroup(groupId:String):Array
Retrieves the list of Rooms which are part of the specified Room Group. | IRoomManager | ||
getUserRooms(user:User):Array
Retrieves a list of Rooms joined by the specified user. | IRoomManager |
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.
|
See also
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.
|
See also
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.
|
See also
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.
|
See also
var roomId:int = 3; var room:Room = sfs.getRoomById(roomId); trace("The name of Room", roomId, "is", room.name);
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.
|
See also
var roomName:String = "The Lobby"; var room:Room = sfs.getRoomByName(roomName); trace("The ID of Room '", roomName, "' is", room.id);
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.
|
See also
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.
|
See also
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.
|
See also
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.
|