Packagenet.user1.reactor.snapshot
Classpublic class ServerModuleListSnapshot
InheritanceServerModuleListSnapshot Inheritance Snapshot Inheritance flash.events.EventDispatcher

Since : Reactor 1.0.2

The ServerModuleListSnapshot class is used to load the server's current list of active server modules (not to be confused with room modules). By default, only administrator clients can load the server's module list. The following code demonstrates:
   // Create the snapshot 
   var snapshot:ServerModuleListSnapshot = new ServerModuleListSnapshot();
   
   // Register a callback function
   snapshot.onLoad = function ():void { 
     trace("Here is the server-module list: " + snapshot.getModuleList());
   }
   
   // Or register a listener function
   snapshot.addEventListener(SnapshotEvent.LOAD, loadListener);
   function loadListener (e:SnapshotEvent):void {
     var snapshot:ServerModuleListSnapshot = ServerModuleListSnapshot(e.target);
     trace("Here is the server-module list: " + snapshot.getModuleList());
   }
   
   // Load the module list by passing the snapshot object to 
   // Reactor's updateSnapshot() method:
   reactor.updateSnapshot(snapshot);
   

The list of modules retrieved by ServerModuleListSnapshot is a one-time snapshot of the state of the server, and is not kept up to date after it is loaded. To update a ServerModuleListSnapshot object to match latest the state of the server, pass that object to Reactor's updateSnapshot() method.

See also

SnapshotEvent
Snapshot
net.user1.reactor.Reactor.updateSnapshot()
ModuleDefinition


Public Variables
 VariableDefined By
 InheritedonLoad : Function
A callback function to be invoked when this snapshot's data is loaded.
Snapshot
Public Methods
 MethodDefined By
  
Constructor
ServerModuleListSnapshot
  
Returns an array of the server modules active on the server.
ServerModuleListSnapshot
 Inherited
getStatus():String
Returns the status of the most recent snapshot load-operation.
Snapshot
 Inherited
Indicates whether the snapshot is currently loading data.
Snapshot
Events
 Event Summary Defined By
 Inherited Dispatched when a snapshot object has been updated in response to an earlier call to Reactor's updateSnapshot() method.Snapshot
 Inherited Dispatched when the result of an update request has been received by a snapshot object.Snapshot
Constructor Description
ServerModuleListSnapshot()Constructor
public function ServerModuleListSnapshot()

Constructor

Method Descriptions
getModuleList()method
public function getModuleList():Array

Since : Reactor 1.0.2

Returns an array of the server modules active on the server.

Returns
Array