Package | net.user1.reactor |
Class | public class RoomModules |
Inheritance | RoomModules ![]() |
Since : | Reactor 1.0.0 |
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
Method | Defined By | ||
---|---|---|---|
Constructor. | RoomModules | ||
addModule(identifier:String, type:String):void
Adds a new room module to the list of room modules. | RoomModules | ||
getIdentifiers():Array
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 |
RoomModules | () | Constructor |
public function RoomModules()
Constructor.
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.
ReturnsArray |
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.
ReturnsString |