| Package | com.adobe.rtc.sharedManagers |
| Class | public class UserManager |
| Inheritance | UserManager flash.events.EventDispatcher |
| Implements | ISessionSubscriber |
Each IConnectSession handles the creation and setup of its own UserManager instance.
Use an IConnectSession userManager property to access it.
<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
| Property | Defined by | ||
|---|---|---|---|
| anonymousPresence : Boolean
Determines whether all the others users in the room be revealed.
| UserManager | ||
| 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 | ||
| customFieldNames : Array [read-only]
Returns the list of all the custom fields created.
| 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 | ||
| myBuddyList : Array
An array of userIDs, which represents the set of users which might be listening for the current user's updates
Note, this isn't the set of users the current user is listening for, but rather the inverse.
| 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 | ||
| Method | Defined by | ||
|---|---|---|---|
| UserManager | |||
|
canUserConfigure(p_userID:String):Boolean
Determines whether or not the given user has power to make modifications to other users.
| UserManager | ||
|
deleteCustomUserField(p_fieldName:String):void
Deletes a custom field for used in the customField Object).
| UserManager | ||
|
getUserDescriptor(p_userID:String):UserDescriptor
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 | ||
|
isPeerEnable():Boolean
This function checks if anyone has peer to peer disabled.
| UserManager | ||
|
registerCustomUserField(p_fieldName:String):void
Registers a custom field for use in the userDescriptor (will appear in the CustomField Object).
| UserManager | ||
|
removeUser(p_userID:String):void
Removes a specified user from the room, thereby ejecting that user.
| UserManager | ||
|
setCustomUserField(p_userID:String, p_fieldName:String, p_value:*):void
Custom User Fields are used to store extended info about a particular user (for example, phone status, "I have a question", etc).
| UserManager | ||
|
setPeer(p_userID:String, p_isPeer:Boolean):void
Modifies the isPeer property of a given 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:
UserManager.anonymousPresence is set to true, then this method might fail if the
user's userDescriptor has not been fetched. | 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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
anonymousUserRemoved(p_evt:CollectionNodeEvent):void
| UserManager | ||
|
createBuddyNode():void
| UserManager | ||
|
createUserManagerNodes():void
| UserManager | ||
|
fetchUserDescriptor(p_userID:String):void
| UserManager | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when anonymousPresence is set in the UserManager | UserManager | |||
| Dispatched when a custom field value for a user has changed. | UserManager | |||
| Dispatched when a custom field for a user is deleted. | UserManager | |||
| Dispatched when a custom field for a user is registered. | UserManager | |||
| 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 | |||
| Constant | Defined by | ||
|---|---|---|---|
| COLLECTION_NAME : String = "UserManager" [static]
The name of the
collectionNode UserManager uses to build its shared model. | UserManager | ||
| Constant | Defined by | ||
|---|---|---|---|
| SIMPLE_BUDDY_PRESENCE_CHANGE : String = "here" [static]
| UserManager | ||
| anonymousPresence | property |
anonymousPresence:Boolean [read-write]Determines whether all the others users in the room be revealed. Upon setting this property to true, users aren't revealed until explicitly called for. UserManager.userCollection and getUserDescriptor won't have any entry for any user (other than one's self) unless there's a specific request for that user. Any call to the getUserDescriptor will cause the UserManager to fetch that particular UserDescriptor and cache it, dispatching the usual userCreate event.
Implementation public function get anonymousPresence():Boolean
public function set anonymousPresence(value:Boolean):void
| audienceCollection | property |
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.
| connectSession | property |
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
| customFieldNames | property |
customFieldNames:Array [read-only]Returns the list of all the custom fields created.
Implementation public function get customFieldNames():Array
| hostCollection | property |
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.
| isSynchronized | property |
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
| myBuddyList | property |
myBuddyList:Array [read-write]An array of userIDs, which represents the set of users which might be listening for the current user's updates Note, this isn't the set of users the current user is listening for, but rather the inverse. The current user would notify users in the Array about all his activities. In other words the users in the Array users are listening to the current user even if he is not listening to them.
Implementation public function get myBuddyList():Array
public function set myBuddyList(value:Array):void
| myUserAffiliation | property |
myUserAffiliation:int [read-only]Specifies the current user's affiliation.
Implementation public function get myUserAffiliation():int
See also
| myUserID | property |
myUserID:String [read-only]
The current user's userID.
public function get myUserID():String
| myUserRole | property |
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
| participantCollection | property |
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.
| userCollection | property |
public var userCollection:ArrayCollection[Read-only] Returns a sorted collection of user descriptors.
This property can be used as the source for data binding.
| UserManager | () | constructor |
public function UserManager()
| anonymousUserRemoved | () | method |
protected function anonymousUserRemoved(p_evt:CollectionNodeEvent):voidParameters
p_evt:CollectionNodeEvent |
| canUserConfigure | () | method |
public function canUserConfigure(p_userID:String):BooleanDetermines whether or not the given user has power to make modifications to other users.
Parametersp_userID:String — The ID of the user in question.
|
Boolean — True if the user can make modifications; false if not.
|
| createBuddyNode | () | method |
protected function createBuddyNode():void
| createUserManagerNodes | () | method |
protected function createUserManagerNodes():void
| deleteCustomUserField | () | method |
public function deleteCustomUserField(p_fieldName:String):voidDeletes a custom field for used in the customField Object). Only hosts are allowed to create deleteFields.
Parametersp_fieldName:String — The name of the custom field to be deleted
|
| fetchUserDescriptor | () | method |
protected function fetchUserDescriptor(p_userID:String):voidParameters
p_userID:String |
| getUserDescriptor | () | method |
public function getUserDescriptor(p_userID:String):UserDescriptor
Fetches all available details about the specified user. If anonymousPresence is set to true,
the method migth return a null if UserDescriptor was never fetched. In such a situation we must
listen to UserEvent.USER_CREATE event and update the User's UserDescriptor we wanted.
Note: If the UserManager.anonymousPresence is set to true, then this method might fail if the
user's userDescriptor has not been fetched. So it is adviced to call this method after the required userDescriptor's
are fetched.In other words listen to UserEvent.USER_CREATE event and call this method after the required
userDescriptor's are fetched.
p_userID:String — The unique ID of the user being queried.
|
UserDescriptor —
The UserDescriptor of the specified user.
|
| getUserRole | () | method |
public function getUserRole(p_userID:String, p_nodeName:String = null):intGets the role of the specified user for a particular node.
Parametersp_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
|
int — int which is the user role value
|
| isPeerEnable | () | method |
public function isPeerEnable():BooleanThis function checks if anyone has peer to peer disabled. i.e. behind firewall or something...
ReturnsBoolean |
| registerCustomUserField | () | method |
public function registerCustomUserField(p_fieldName:String):voidRegisters a custom field for use in the userDescriptor (will appear in the CustomField Object). Only hosts are allowed to create regisfields, but users can publish them once
Parametersp_fieldName:String — The name of the new custom field
|
| removeUser | () | method |
public function removeUser(p_userID:String):voidRemoves a specified user from the room, thereby ejecting that user.
Parametersp_userID:String — the userID of the desired ejectee
|
| setCustomUserField | () | method |
public function setCustomUserField(p_userID:String, p_fieldName:String, p_value:*):voidCustom User Fields are used to store extended info about a particular user (for example, phone status, "I have a question", etc). A custom field must be registered before it can be modified. Custom fields are modifiable by the given user or a host.
Parametersp_userID:String — The user to be modified
|
|
p_fieldName:String — The name of the custom field to modify
|
|
p_value:* — The new value for the custom field (null to delete)
|
| setPeer | () | method |
public function setPeer(p_userID:String, p_isPeer:Boolean):voidModifies the isPeer property of a given user. Note that only OWNERs and the user in question are able to change the user's displayName. This shows whether an user can do p2p streaming.
Parametersp_userID:String — The userID of the specified user
|
|
p_isPeer:Boolean — The new displayName to assign to that user
|
| setPingData | () | method |
public function setPingData(p_userID:String, p_latency:int, p_drops:int):voidPublishes a ping data update.
Parametersp_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):voidSets the user's connection to one of the following:
UserManager.anonymousPresence is set to true, then this method might fail if the
user's userDescriptor has not been fetched. So it is adviced to call this method after the required userDescriptor's
are fetched.In other words listen to UserEvent.USER_CREATE event and call this method after the required
userDescriptor's are fetched.
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.
Note: If the UserManager.anonymousPresence is set to true, then this method might fail if the
user's userDescriptor has not been fetched. So it is adviced to call this method after the required userDescriptor's
are fetched.In other words listen to UserEvent.USER_CREATE event and call this method after the required
userDescriptor's are fetched.
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):voidPromotes 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.
Parametersp_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.
Note: If the UserManager.anonymousPresence is set to true, then this method might fail if the
user's userDescriptor has not been fetched. So it is adviced to call this method after the required userDescriptor's
are fetched.In other words listen to UserEvent.USER_CREATE event and call this method after the required
userDescriptor's are fetched.
p_userID:String — The userID of the user specified.
|
|
p_usericonURL:String — the URL of the icon desired.
|
| anonymousPresenceChange | event |
com.adobe.rtc.events.UserEvent
Dispatched when anonymousPresence is set in the UserManager
| customFieldChange | event |
com.adobe.rtc.events.UserEvent
Dispatched when a custom field value for a user has changed.
| customFieldDelete | event |
com.adobe.rtc.events.UserEvent
Dispatched when a custom field for a user is deleted.
| customFieldRegister | event |
com.adobe.rtc.events.UserEvent
Dispatched when a custom field for a user is registered.
| synchronizationChange | event |
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.
| userBooted | event |
com.adobe.rtc.events.UserEvent
Dispatched when a user is forcibly ejected from the room.
| userConnectionChange | event |
com.adobe.rtc.events.UserEvent
Dispatched when a user's connection speed has changed.
| userCreate | event |
| userNameChange | event |
com.adobe.rtc.events.UserEvent
Dispatched when the user's displayName has changed.
| userPingDataChange | event |
| userRemove | event |
| userRoleChange | event |
| userUsericonURLChange | event |
| COLLECTION_NAME | constant |
public static const COLLECTION_NAME:String = "UserManager"
The name of the collectionNode UserManager uses to build its shared model.
| SIMPLE_BUDDY_PRESENCE_CHANGE | constant |
protected static const SIMPLE_BUDDY_PRESENCE_CHANGE:String = "here"
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