Packagenet.user1.reactor
Classpublic class RoomClassRegistry
InheritanceRoomClassRegistry Inheritance Object

Since : Reactor 1.0.0

RoomClassRegistry maintains a catalog of the classes that are used to represent the rooms in an application. By default, rooms are represented by the Room class. To specify a custom class for a room with a given ID, use setRoomClass() before creating, joining, or observing the room.

See also

Room


Public Methods
 MethodDefined By
  
RoomClassRegistry
  
clearRoomClass(roomID:String):void
Removes the current custom class association for the specified roomID.
RoomClassRegistry
  
getRoomClass(roomID:String):Class
Returns the current custom class association for the specified roomID.
RoomClassRegistry
  
setRoomClass(roomID:String, roomClass:Class):void
Specifies the class that will be used to represent the room with the specified roomID.
RoomClassRegistry
Constructor Description
RoomClassRegistry()Constructor
public function RoomClassRegistry()



Method Descriptions
clearRoomClass()method
public function clearRoomClass(roomID:String):void

Since : Reactor 1.0.0

Removes the current custom class association for the specified roomID.

Parameters

roomID:String

See also

getRoomClass()method 
public function getRoomClass(roomID:String):Class

Since : Reactor 1.0.0

Returns the current custom class association for the specified roomID.

Parameters

roomID:String

Returns
Class

See also

setRoomClass()method 
public function setRoomClass(roomID:String, roomClass:Class):void

Since : Reactor 1.0.0

Specifies the class that will be used to represent the room with the specified roomID. If the current client joins or observes the specified room, RoomManager will create an instance of the specified roomClass, and that instance will be returned by all RoomManager methods that provide access to the room. The specified roomClass must extend the built-in Room class.

Parameters

roomID:String
 
roomClass:Class

See also


Example
The following code assigns the class ChessRoom as the class for the room with the roomID "games.chess":
     // Specify the room class
     var registry:RoomClassRegistry = reactor.getRoomManager().getRoomClassRegistry();
     registry.setRoomClass("games.chess", ChessRoom);
     
     // Create the room object
     var chessRoom:ChessRoom = reactor.getRoomManager().createRoom("games.chess");