Packagecom.adobe.rtc.sharedManagers
Classpublic class UserManager
InheritanceUserManager Inheritance flash.events.EventDispatcher
ImplementsISessionSubscriber

UserManager is one of the "four pillars" of a room and is tasked with maintaining a list of the set of users in the room, along with their descriptors. It is also the primary class through which one publishes changes to a user role or other user information.

Each IConnectSession handles the creation and setup of its own UserManager instance. Use an IConnectSession userManager property to access it.

Building a basic roster list
  <rtc:AdobeHSAuthenticator userName="AdobeIDusername password="AdobeIDpassword" id="auth"/>
  <session:ConnectSessionContainer 
    id="cSession" 
    roomURL="http://connect.acrobat.com/fakeRoom/" 
    authenticator="{auth}">
    
      <mx:List width="300" height="600" dataProvider="{cSession.userManager.userCollection}" 
      labelField="displayName"/>
  </session:ConnectSessionContainer> 

See also

com.adobe.rtc.sharedManagers.descriptors.UserDescriptor
com.adobe.rtc.events.UserEvent
com.adobe.rtc.session.IConnectSession


Public Properties
 PropertyDefined by
  audienceCollection : ArrayCollection
[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.VIEWER.
UserManager
  connectSession : IConnectSession
(Read Only) Specifies the IConnectSession to which this manager is assigned.
UserManager
  hostCollection : ArrayCollection
[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.OWNER.
UserManager
  isSynchronized : Boolean
[read-only] Specifies whether or not the UserManager has connected and has synchronized all of the user information from the service.
UserManager
  myUserAffiliation : int
[read-only] Specifies the current user's affiliation.
UserManager
  myUserID : String
[read-only] The current user's userID.
UserManager
  myUserRole : int
[read-only] Specifies the current user's role.
UserManager
  participantCollection : ArrayCollection
[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.PUBLISHER.
UserManager
  userCollection : ArrayCollection
[Read-only] Returns a sorted collection of user descriptors.
UserManager
Public Methods
 MethodDefined by
  
UserManager
  
canUserConfigure(p_userID:String):Boolean
Determines whether or not the given user has power to make modifications to other users.
UserManager
  
Fetches all available details about the specified user.
UserManager
  
getUserRole(p_userID:String, p_nodeName:String = null):int
Gets the role of the specified user for a particular node.
UserManager
  
removeUser(p_userID:String):void
Removes a specified user from the room, thereby ejecting that user.
UserManager
  
setPingData(p_userID:String, p_latency:int, p_drops:int):void
Publishes a ping data update.
UserManager
  
setUserConnection(p_userID:String, p_conn:String, p_forceUpdate:Boolean = false):void
Sets the user's connection to one of the following:
  • RoomSettings.MODEM
  • RoomSettings.DSL
  • RoomSettings.LAN
UserManager
  
setUserDisplayName(p_userID:String, p_name:String):void
Modifies the displayName of a given user.
UserManager
  
setUserRole(p_userID:String, p_role:int):void
Promotes or demotes the specified user at the "root level".
UserManager
  
setUserUsericonURL(p_userID:String, p_usericonURL:String):void
Sets the URL for the user's avatar icon.
UserManager
Events
 EventSummaryDefined by
   Dispatched when the UserManager has received everything up to the current state of the room or has lost the connection.UserManager
   Dispatched when a user is forcibly ejected from the room.UserManager
   Dispatched when a user's connection speed has changed.UserManager
   Dispatched when a new user joins the room.UserManager
   Dispatched when the user's displayName has changed.UserManager
   Dispatched when a user's ping data has changed.UserManager
   Dispatched when a user leaves the room.UserManager
   Dispatched when the user's role has changed.UserManager
   Dispatched when a user's icon URL has changed.UserManager
Public Constants
 ConstantDefined by
  COLLECTION_NAME : String = "UserManager"
[static] The name of the collectionNode UserManager uses to build its shared model.
UserManager
Property detail
audienceCollectionproperty
public var audienceCollection:ArrayCollection

[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.VIEWER.

This property can be used as the source for data binding.

connectSessionproperty 
connectSession:IConnectSession  [read-write]

(Read Only) Specifies the IConnectSession to which this manager is assigned.

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
hostCollectionproperty 
public var hostCollection:ArrayCollection

[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.OWNER.

This property can be used as the source for data binding.

isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Specifies whether or not the UserManager has connected and has synchronized all of the user information from the service.

Implementation
    public function get isSynchronized():Boolean
myUserAffiliationproperty 
myUserAffiliation:int  [read-only]

Specifies the current user's affiliation.

Implementation
    public function get myUserAffiliation():int

See also

myUserIDproperty 
myUserID:String  [read-only]

The current user's userID.

Implementation
    public function get myUserID():String
myUserRoleproperty 
myUserRole:int  [read-only]

Specifies the current user's role.

This property can be used as the source for data binding.

Implementation
    public function get myUserRole():int
participantCollectionproperty 
public var participantCollection:ArrayCollection

[Read-only] Returns a sorted collection of user descriptors with root user roles of UserRoles.PUBLISHER.

This property can be used as the source for data binding.

userCollectionproperty 
public var userCollection:ArrayCollection

[Read-only] Returns a sorted collection of user descriptors.

This property can be used as the source for data binding.

Constructor detail
UserManager()constructor
public function UserManager()
Method detail
canUserConfigure()method
public function canUserConfigure(p_userID:String):Boolean

Determines whether or not the given user has power to make modifications to other users.

Parameters
p_userID:String — The ID of the user in question.

Returns
Boolean — True if the user can make modifications; false if not.
getUserDescriptor()method 
public function getUserDescriptor(p_userID:String):UserDescriptor

Fetches all available details about the specified user.

Parameters
p_userID:String — The unique ID of the user being queried.

Returns
UserDescriptor — The UserDescriptor of the specified user.
getUserRole()method 
public function getUserRole(p_userID:String, p_nodeName:String = null):int

Gets the role of the specified user for a particular node.

Parameters
p_userID:String — The specified user's userID.
 
p_nodeName:String (default = null) — The group name on which we are getting the user roles, default is null

Returns
int — int which is the user role value
removeUser()method 
public function removeUser(p_userID:String):void

Removes a specified user from the room, thereby ejecting that user.

Parameters
p_userID:String — the userID of the desired ejectee
setPingData()method 
public function setPingData(p_userID:String, p_latency:int, p_drops:int):void

Publishes a ping data update.

Parameters
p_userID:String — The userID of the user to update.
 
p_latency:int — The new latency statistic.
 
p_drops:int — The new drops statistic.
setUserConnection()method 
public function setUserConnection(p_userID:String, p_conn:String, p_forceUpdate:Boolean = false):void

Sets the user's connection to one of the following:

Parameters
p_userID:String — The userID of the user the change.
 
p_conn:String — The new connection speed value which is one of the RoomSetting constants.
 
p_forceUpdate:Boolean (default = false) — Whether or not the update should be forced; the default is false.
setUserDisplayName()method 
public function setUserDisplayName(p_userID:String, p_name:String):void

Modifies the displayName of a given user. Note that only OWNERs and the user in question are able to change the user's displayName.

Parameters
p_userID:String — The userID of the specified user
 
p_name:String — The new displayName to assign to that user
setUserRole()method 
public function setUserRole(p_userID:String, p_role:int):void

Promotes or demotes the specified user at the "root level". This is the primary way to change a user's role (although it's also possible to change a user's role relative to a specific CollectionNode within the application). Note that only users with an owner role at the root level may call this method.

Parameters
p_userID:String — The unique ID of the user to affect
 
p_role:int — The new role for the user

See also

setUserUsericonURL()method 
public function setUserUsericonURL(p_userID:String, p_usericonURL:String):void

Sets the URL for the user's avatar icon.

Parameters
p_userID:String — The userID of the user specified.
 
p_usericonURL:String — the URL of the icon desired.
Event detail
synchronizationChangeevent 
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when the UserManager has received everything up to the current state of the room or has lost the connection.

userBootedevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user is forcibly ejected from the room.

userConnectionChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user's connection speed has changed.

userCreateevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a new user joins the room.

userNameChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when the user's displayName has changed.

userPingDataChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user's ping data has changed.

userRemoveevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user leaves the room.

userRoleChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when the user's role has changed.

userUsericonURLChangeevent  
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user's icon URL has changed.

Constant detail
COLLECTION_NAMEconstant
public static const COLLECTION_NAME:String = "UserManager"

The name of the collectionNode UserManager uses to build its shared model.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/sharedManagers/UserManager.html