Packagecom.adobe.rtc.sharedModel
Classpublic class UserQueue
InheritanceUserQueue Inheritance flash.events.EventDispatcher
ImplementsISessionSubscriber

UserQueue is a model class that can be used to create and manage queues of users who are making requests. Examples of such queues include groups of users who are: There are two classes of users for this class: queue managers and queue users (queue managers are also queue users): Each of these two classes of users are defined by specifying the role levels of each class in the constructor.

User requests are either pending, accepted, denied, or canceled. A UserQueueItem is used to store each request.

Note that this component supports "piggybacking" on existing CollectionNodes through its constructor. Developers can avoid CollectionNode proliferation in their apps by pre-supplying a CollectionNode and a nodeName for the UserQueue to use. If none is supplied, the UserQueue will create its own collectionNode for sending and receiving messages.

See also

com.adobe.rtc.sharedModel.userQueueClasses.UserQueueItem
UserQueueEvent


Public Properties
 PropertyDefined by
  collectionNode : CollectionNode
Sets the Collection Node to which the shared property subscribes/publishes
UserQueue
  connectSession : IConnectSession
The IConnectSession with which this component is associated.
UserQueue
  isSynchronized : Boolean
[read-only] Determines whether the UserQueue is connected and fully synchronized with the service.
UserQueue
  nodeNameNotification : String
Sets the Node Name for the notification node
UserQueue
  nodeNameQueue : String
Sets the Node Name for the Queue Node
UserQueue
  pendingQueue : Array
[read-only] Returns an array of UserQueueItems containing only items that have status of STATUS_PENDING.
UserQueue
  queue : Array
[read-only]
UserQueue
  roleForManaging : int
Determines the role needed for managing this queue.
UserQueue
  roleForRequesting : int
Determines the role needed for using this queue.
UserQueue
  sessionDependentQueueItems : Boolean
Sets true or false whether the queue items are session dependent or not..
UserQueue
  sharedID : String
Defines the logical location of the component on the service - typically this assigns the sharedID of the collectionNode used by the component.
UserQueue
  userDependentQueueItems : Boolean
Sets true or false whether the queue items are user dependent or not..
UserQueue
Public Methods
 MethodDefined by
  
Constructor.
UserQueue
  
acceptAllPending(p_response:String = null):void
Accepts all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
acceptFirstPending(p_response:String = null):void
Accepts the first pending item in the queue and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
acceptUser(p_userID:String, p_response:String = null):void
Accepts the request of user with the p_userID and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
cancel(p_response:String = null):void
Makes a user request to cancel one of their previous requests.
UserQueue
  
cancelAllPending(p_response:String = null):void
Cancels all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
cancelFirstPending(p_response:String = null):void
Cancels the first pending item in the queue and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
cancelUser(p_userID:String, p_response:String = null):void
Cancels the request of user with the p_userID and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
clear(p_reason:String):void
Clears the pending queue as well as all of the requests that have been previously dealt with and sends an optional reason for clearing which is passed to the CLEAR event; it does nothing if called by a non-queue-manager.
UserQueue
  
close():void
Disposes all listeners to the network and framework classes.
UserQueue
  
denyAllPending(p_response:String = null):void
Denies all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
denyFirstPending(p_response:String = null):void
Denies the first pending item in the queue but does nothing if called by a non-queue-manager.
UserQueue
  
denyUser(p_userID:String, p_response:String = null):void
Denies the request of user with a specific p_userID and sends an optional response; it does nothing if called by a non-queue-manager.
UserQueue
  
getUserItem(p_userID:String):UserQueueItem
Returns the UserQueueItem for a specific user.
UserQueue
  
request(p_message:String = "", p_descriptor:Object = null):void
Makes a user request to be added to the queue and an optional reason which could indicate the reason they want to be added.
UserQueue
  
subscribe():void
Tells the component to begin synchronizing with the service.
UserQueue
Events
 EventSummaryDefined by
   Dispatched when an item in the queue is accepted.UserQueue
   Dispatched when an item in the queue is cancelled.UserQueue
   Dispatched when an item in the queue is denied.UserQueue
   Dispatched when the queue is cleared.UserQueue
   Dispatched when a UserQueueItem is added or handled.UserQueue
   Dispatched when the component goes in and out of sync.UserQueue
Property detail
collectionNodeproperty
collectionNode:CollectionNode  [read-write]

Sets the Collection Node to which the shared property subscribes/publishes

Implementation
    public function get collectionNode():CollectionNode
    public function set collectionNode(value:CollectionNode):void
connectSessionproperty 
connectSession:IConnectSession  [read-write]

The IConnectSession with which this component is associated. Note that this may only be set once before subscribe is called; re-sessioning of components is not supported. Defaults to the first IConnectSession created in the application.

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Determines whether the UserQueue is connected and fully synchronized with the service.

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

Implementation
    public function get isSynchronized():Boolean
nodeNameNotificationproperty 
nodeNameNotification:String  [read-write]

Sets the Node Name for the notification node

Implementation
    public function get nodeNameNotification():String
    public function set nodeNameNotification(value:String):void
nodeNameQueueproperty 
nodeNameQueue:String  [read-write]

Sets the Node Name for the Queue Node

Implementation
    public function get nodeNameQueue():String
    public function set nodeNameQueue(value:String):void
pendingQueueproperty 
pendingQueue:Array  [read-only]

Returns an array of UserQueueItems containing only items that have status of STATUS_PENDING.

Implementation
    public function get pendingQueue():Array
queueproperty 
queue:Array  [read-only]Implementation
    public function get queue():Array
roleForManagingproperty 
roleForManaging:int  [read-write]

Determines the role needed for managing this queue.

Implementation
    public function get roleForManaging():int
    public function set roleForManaging(value:int):void
roleForRequestingproperty 
roleForRequesting:int  [read-write]

Determines the role needed for using this queue.

Implementation
    public function get roleForRequesting():int
    public function set roleForRequesting(value:int):void
sessionDependentQueueItemsproperty 
sessionDependentQueueItems:Boolean  [read-write]

Sets true or false whether the queue items are session dependent or not..

Implementation
    public function get sessionDependentQueueItems():Boolean
    public function set sessionDependentQueueItems(value:Boolean):void
sharedIDproperty 
sharedID:String  [read-write]

Defines the logical location of the component on the service - typically this assigns the sharedID of the collectionNode used by the component. sharedIDs should be unique within a room (if they're expressing 2 unique locations). Note that this can only be assigned once (before subscribe() is called). For components with an id property, sharedID defaults to that value.

Implementation
    public function get sharedID():String
    public function set sharedID(value:String):void
userDependentQueueItemsproperty 
userDependentQueueItems:Boolean  [read-write]

Sets true or false whether the queue items are user dependent or not..

Implementation
    public function get userDependentQueueItems():Boolean
    public function set userDependentQueueItems(value:Boolean):void
Constructor detail
UserQueue()constructor
public function UserQueue()

Constructor.

Method detail
acceptAllPending()method
public function acceptAllPending(p_response:String = null):void

Accepts all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
acceptFirstPending()method 
public function acceptFirstPending(p_response:String = null):void

Accepts the first pending item in the queue and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
acceptUser()method 
public function acceptUser(p_userID:String, p_response:String = null):void

Accepts the request of user with the p_userID and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_userID:String — The userID of the user to accept.
 
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
cancel()method 
public function cancel(p_response:String = null):void

Makes a user request to cancel one of their previous requests.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
cancelAllPending()method 
public function cancelAllPending(p_response:String = null):void

Cancels all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
cancelFirstPending()method 
public function cancelFirstPending(p_response:String = null):void

Cancels the first pending item in the queue and sends an optional response; it does nothing if called by a non-queue-manager. Non-queue-managers may call cancel() to cancel their own requests.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
cancelUser()method 
public function cancelUser(p_userID:String, p_response:String = null):void

Cancels the request of user with the p_userID and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_userID:String — The userID of the user to cancel.
 
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
clear()method 
public function clear(p_reason:String):void

Clears the pending queue as well as all of the requests that have been previously dealt with and sends an optional reason for clearing which is passed to the CLEAR event; it does nothing if called by a non-queue-manager.

Parameters
p_reason:String — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to those waiting in the queue.
close()method 
public function close():void

Disposes all listeners to the network and framework classes. Recommended for proper garbage collection of the component.

denyAllPending()method 
public function denyAllPending(p_response:String = null):void

Denies all pending requests and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
denyFirstPending()method 
public function denyFirstPending(p_response:String = null):void

Denies the first pending item in the queue but does nothing if called by a non-queue-manager.

Parameters
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
denyUser()method 
public function denyUser(p_userID:String, p_response:String = null):void

Denies the request of user with a specific p_userID and sends an optional response; it does nothing if called by a non-queue-manager.

Parameters
p_userID:String — The userID of the user to deny.
 
p_response:String (default = null) — [Optional. Defaults to null] On this function's action, a message sent from the queue manager to someone waiting in the queue.
getUserItem()method 
public function getUserItem(p_userID:String):UserQueueItem

Returns the UserQueueItem for a specific user. If it is called by a non-queue-manager, then it returns null.

Parameters
p_userID:String — The ID of the user associated with this queue item.

Returns
UserQueueItem
request()method 
public function request(p_message:String = "", p_descriptor:Object = null):void

Makes a user request to be added to the queue and an optional reason which could indicate the reason they want to be added.

Parameters
p_message:String (default = "") — [Optional] A message string sent from the requester to the queue manager.
 
p_descriptor:Object (default = null) — p_descriptor [Optional] An object that describes information about UserQueueItem
subscribe()method 
public function subscribe():void

Tells the component to begin synchronizing with the service. For "headless" components such as this one, this method must be called explicitly.

Event detail
acceptedevent 
Event object type: com.adobe.rtc.events.UserQueueEvent

Dispatched when an item in the queue is accepted.

cancelevent  
Event object type: com.adobe.rtc.events.UserQueueEvent

Dispatched when an item in the queue is cancelled.

denyevent  
Event object type: com.adobe.rtc.events.UserQueueEvent

Dispatched when an item in the queue is denied.

queueClearevent  
Event object type: com.adobe.rtc.events.UserQueueEvent

Dispatched when the queue is cleared.

queueItemUpdateevent  
Event object type: com.adobe.rtc.events.UserQueueEvent

Dispatched when a UserQueueItem is added or handled.

synchronizationChangeevent  
Event object type: com.adobe.rtc.events.CollectionNodeEvent

Dispatched when the component goes in and out of sync.





 

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/sharedModel/UserQueue.html