Packagenet.user1.reactor
Classpublic class RoomModules
InheritanceRoomModules Inheritance Object

Since : Reactor 1.0.0

A simple data container indicating the locations and names of a set of server-side room modules. The RoomModules class is used to specify the room modules that should be attached to a server-side room at creation time. For example, the following code creates a server-side room with a room module named com.business.StockTickerListener.
   var modules:RoomModules = new RoomModules();
   modules.addModule("com.business.StockTickerListener", ModuleType.CLASS);
   theRoomManager.createRoom("someRoomID",
                             null,
                             null,
                             modules);

On the server, each room is represented by a Java Room object with zero or more registered room modules. The Room object manages a client list and broadcasts basic room events. The room modules are expected to respond to those events and provide the application behaviour for the room.

To add new functionality to a room (above and beyond the functionality provided by the server), a server-side developer creates a new room module as a class or a script, and registers that module to receive the room's events.

For information on room modules, see Union Server's modules documentation.

See also

RoomManager.createRoom()


Public Methods
 MethodDefined By
  
Constructor.
RoomModules
  
addModule(identifier:String, type:String):void
Adds a new room module to the list of room modules.
RoomModules
  
Returns a list of the module identifiers in this RoomModules object.
RoomModules
  
serialize():String
Returns a string representing of the room modules, suitable for sending to the server via the u24 UPC.
RoomModules
Constructor Description
RoomModules()Constructor
public function RoomModules()

Constructor.

Method Descriptions
addModule()method
public function addModule(identifier:String, type:String):void

Since : Reactor 1.0.0

Adds a new room module to the list of room modules.

Parameters

identifier:String — The module identifier. For example, "com.domain.WhiteBoardModule" (for a Java class) or "com.domain.WhiteBoardModule.js" (for a JavaScript script).
 
type:String — The module type. Must be one of the constants defined by the ModuleType class.

See also

getIdentifiers()method 
public function getIdentifiers():Array

Since : Reactor 1.0.0

Returns a list of the module identifiers in this RoomModules object. Used for internal debugging and error handling.

Returns
Array
serialize()method 
public function serialize():String

Since : Reactor 1.0.0

Returns a string representing of the room modules, suitable for sending to the server via the u24 UPC. This method is used internally by Reactor.

Returns
String