Packagenet.user1.reactor
Classpublic final class UpdateLevels
InheritanceUpdateLevels Inheritance Object

Since : Reactor 1.0.0

The UpdateLevels class specifies the amount of information a client wishes to receive from the server about a room it has either joined or is observing. Room update levels are intended for use with massively multiuser applications, where clients must conserve bandwidth by minimizing the amount of traffic sent by the server.

For example, imagine a nation-wide live quiz with 10000 participants in a single room. To conserve bandwidth and CPU, each participant must disable all updates about all other room occupants, while receiving aggregated application updates in the form of room messages sent by a server-side room module. To receive messages sent to the room by room modules only, and ignore all other updates for the room, each quiz client explicitly sets reduced update levels when joining the room, as shown in the following code. Notice the use of the UpdateLevels class's clearAll() method, which provides a convenient way to set all update levels to false.

   var updateLevels:UpdateLevels = new UpdateLevels();
   // First, disable all updates by invoking clearAll()
   updateLevels.clearAll()
   // Next, enable room-message updates only
   updateLevels.roomMessages = true;
   quizRoom.join(null, updateLevels);
   

See also

Room.setUpdateLevels()
Room.join()
RoomManager.joinRoom()
Room.observe()
RoomManager.observeRoom()


Public Variables
 VariableDefined By
  allRoomAttributes : Boolean
Identical to the sharedRoomAttributes variable, but also includes non-shared attributes.
UpdateLevels
  observerCount : Boolean
When true, the current client is sent an update any time the number of clients observing the target room changes; defaults to false.
UpdateLevels
  observerList : Boolean
When true, the current client is sent an update any time a client observes or stops observing the target room; defaults to false.
UpdateLevels
  observerLoginLogoff : Boolean
When true, the current client is sent an update any time an observer of the target room logs in or logs off; defaults to true.
UpdateLevels
  occupantCount : Boolean
When true, the current client is sent an update any time the number of clients in the target room changes; defaults to false.
UpdateLevels
  occupantList : Boolean
When true, the current client is sent an update any time a client joins or leaves the target room; defaults to true.
UpdateLevels
  occupantLoginLogoff : Boolean
When true, the current client is sent an update any time an occupant of the target room logs in or logs off; defaults to true.
UpdateLevels
  roomMessages : Boolean
When true, the current client is sent an update any time a message is sent to the target room; defaults to true.
UpdateLevels
  sharedObserverAttributesGlobal : Boolean
When true, the current client is sent an update any time an observer of the target room sets or deletes a global shared attribute; defaults to false.
UpdateLevels
  sharedObserverAttributesRoom : Boolean
When true, the current client is sent an update any time an observer of the target room sets or deletes a room-scoped shared-attribute; defaults to false.
UpdateLevels
  sharedOccupantAttributesGlobal : Boolean
When true, the current client is sent an update any time an occupant of the target room sets or deletes a global shared attribute; defaults to true.
UpdateLevels
  sharedOccupantAttributesRoom : Boolean
When true, the current client is sent an update any time an occupant of the target room sets or deletes a room-scoped shared-attribute; defaults to true.
UpdateLevels
  sharedRoomAttributes : Boolean
When true, the current client is sent an update any time one of the target room's shared attributes changes or is deleted; defaults to true.
UpdateLevels
Public Methods
 MethodDefined By
  
UpdateLevels
  
clearAll():void
Sets all update levels to false.
UpdateLevels
  
fromInt(levels:int):void
Assigns the levels of this UpdateLevels object based on the supplied integer, whose bits represent the desired new update levels.
UpdateLevels
  
Sets all update levels to their default values, as specified in the documentation for each update level constant.
UpdateLevels
  
toInt():int
Converts this UpdateLevels object to an integer whose bits represent the specified update levels.
UpdateLevels
Variable Descriptions
allRoomAttributesvariable
public var allRoomAttributes:Boolean

Since : Reactor 1.0.0

Identical to the sharedRoomAttributes variable, but also includes non-shared attributes. Requires administrator privileges; defaults to false.

observerCountvariable 
public var observerCount:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time the number of clients observing the target room changes; defaults to false. Updates trigger the following events:

observerListvariable 
public var observerList:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time a client observes or stops observing the target room; defaults to false. Updates trigger the following events:

observerLoginLogoffvariable 
public var observerLoginLogoff:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an observer of the target room logs in or logs off; defaults to true. Updates trigger the following events:

See also

occupantCountvariable 
public var occupantCount:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time the number of clients in the target room changes; defaults to false. Updates trigger the following events:

occupantListvariable 
public var occupantList:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time a client joins or leaves the target room; defaults to true. Updates trigger the following events:

occupantLoginLogoffvariable 
public var occupantLoginLogoff:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an occupant of the target room logs in or logs off; defaults to true. Updates trigger the following events:

See also

roomMessagesvariable 
public var roomMessages:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time a message is sent to the target room; defaults to true. Updates trigger message listeners registered via the Room class's addMessageListener() method.

See also

sharedObserverAttributesGlobalvariable 
public var sharedObserverAttributesGlobal:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an observer of the target room sets or deletes a global shared attribute; defaults to false. Updates trigger the following events:

sharedObserverAttributesRoomvariable 
public var sharedObserverAttributesRoom:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an observer of the target room sets or deletes a room-scoped shared-attribute; defaults to false. Updates trigger the following events:

sharedOccupantAttributesGlobalvariable 
public var sharedOccupantAttributesGlobal:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an occupant of the target room sets or deletes a global shared attribute; defaults to true. Updates trigger the following events:

sharedOccupantAttributesRoomvariable 
public var sharedOccupantAttributesRoom:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time an occupant of the target room sets or deletes a room-scoped shared-attribute; defaults to true. Updates trigger the following events:

sharedRoomAttributesvariable 
public var sharedRoomAttributes:Boolean

Since : Reactor 1.0.0

When true, the current client is sent an update any time one of the target room's shared attributes changes or is deleted; defaults to true. Updates trigger the following events:

Constructor Description
UpdateLevels()Constructor
public function UpdateLevels()



Method Descriptions
clearAll()method
public function clearAll():void

Since : Reactor 1.0.0

Sets all update levels to false.

fromInt()method 
public function fromInt(levels:int):void

Since : Reactor 1.0.0

Assigns the levels of this UpdateLevels object based on the supplied integer, whose bits represent the desired new update levels. The fromInt() method is used internally by Reactor when receiving room update levels from Union Server.

Parameters

levels:int

restoreDefaults()method 
public function restoreDefaults():void

Since : Reactor 1.0.0

Sets all update levels to their default values, as specified in the documentation for each update level constant.

toInt()method 
public function toInt():int

Since : Reactor 1.0.0

Converts this UpdateLevels object to an integer whose bits represent the specified update levels. The toInt() method is used internally by Reactor when sending room update levels to Union Server.

Returns
int