Packagecom.adobe.rtc.collaboration
Classpublic class FileSubscriber
InheritanceFileSubscriber Inheritance mx.core.UIComponent
ImplementsISessionSubscriber
SubclassesBinarySubscriber

FileSubscriber is a simple helper class that enables file download as specified by a FileDescriptor. A developer should use the FileManager's events and methods in order to see what files are available in a room. For details about a higher level component with a user interface which allows for uploading, listing, and downloading files, see com.adobe.rtc.pods.FileShare.

See also

com.adobe.rtc.sharedManagers.FileManager
com.adobe.rtc.sharedManagers.descriptors.FileDescriptor
com.adobe.rtc.collaboration.FileSubscriber
com.adobe.rtc.pods.FileShare


Public Properties
 PropertyDefined by
  accessModel : int
The role value required for accessing files associated with this component's group as specified by groupName.
FileSubscriber
  connectSession : IConnectSession
The IConnectSession with which this component is associated; it defaults to the first IConnectSession created in the application.
FileSubscriber
  groupName : String
Components (pods) are assigned to a group via groupName; if not specified, the component is assigned to the default, public group (the room at large).
FileSubscriber
  isSynchronized : Boolean
[read-only] Returns true if the model is synchronized.
FileSubscriber
  publishModel : int
The role required for this component to publish to the group specified by groupName.
FileSubscriber
  sharedID : String
Defines the logical location of the component on the service; typically this assigns the sharedID of the collectionNode used by the component.
FileSubscriber
Public Methods
 MethodDefined by
  
FileSubscriber
  
close():void
Disposes all listeners to the network and framework classes and is recommended for proper garbage collection of the component.
FileSubscriber
  
download(p_fileDescriptor:FileDescriptor):void
Downloads the file specified by the supplied FileDescriptor.
FileSubscriber
  
Gets the NodeConfiguration on a specific file group.
FileSubscriber
  
getUserRole(p_userID:String):int
Returns the role of a given user for files, within the group this component is assigned to.
FileSubscriber
  
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
FileSubscriber
  
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for subscribing to files within this component's group specified by groupName.
FileSubscriber
  
subscribe():void
Subscribes to a particular stream.
FileSubscriber
Events
 EventSummaryDefined by
   Dispatched on download completion.FileSubscriber
   Dispatched on httpStatus.FileSubscriber
   Dispatched on an IO error.FileSubscriber
   Dispatched as a download progresses.FileSubscriber
   Dispatched on a security error.FileSubscriber
   Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.FileSubscriber
Property detail
accessModelproperty
accessModel:int  [read-write]

The role value required for accessing files associated with this component's group as specified by groupName.

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

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

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
groupNameproperty 
groupName:String  [read-write]

Components (pods) are assigned to a group via groupName; if not specified, the component is assigned to the default, public group (the room at large). Groups are like separate conversations within the room, but each conversation could employ one or more pods; for example, one "conversation" may use a web camera, chat, and whiteboard pod, with each pod using different access and publish models. Users are members of and can only see components within the group they are assigned. Room hosts can see all the groups and all the members in those groups.

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

Returns true if the model is synchronized.

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

Implementation
    public function get isSynchronized():Boolean
publishModelproperty 
publishModel:int  [read-write]

The role required for this component to publish to the group specified by groupName.

Implementation
    public function get publishModel():int
    public function set publishModel(value:int):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 two 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
Constructor detail
FileSubscriber()constructor
public function FileSubscriber()
Method detail
close()method
public function close():void

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

download()method 
public function download(p_fileDescriptor:FileDescriptor):void

Downloads the file specified by the supplied FileDescriptor. The User will be prompted to save the file to their file system.

Parameters
p_fileDescriptor:FileDescriptor — A FileDescriptor representing the file to download. For details about accessing a list of files available in the room, see FileManager's APIs.
getNodeConfiguration()method 
public function getNodeConfiguration():NodeConfiguration

Gets the NodeConfiguration on a specific file group.

Returns
NodeConfiguration
getUserRole()method 
public function getUserRole(p_userID:String):int

Returns the role of a given user for files, within the group this component is assigned to.

Parameters
p_userID:String — The user ID of the user whose role we should get.

Returns
int
setNodeConfiguration()method 
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void

Sets the NodeConfiguration.

Parameters
p_nodeConfiguration:NodeConfiguration — The node Configuration of the file group.
setUserRole()method 
public function setUserRole(p_userID:String, p_userRole:int):void

Sets the role of a given user for subscribing to files within this component's group specified by groupName.

Parameters
p_userID:String — The user ID of the user whose role should be set.
 
p_userRole:int — The role value to assign to the user with this user ID.
subscribe()method 
public function subscribe():void

Subscribes to a particular stream.

Event detail
completeevent 
Event object type: flash.events.Event

Dispatched on download completion.

httpStatusevent  
Event object type: flash.events.HTTPStatusEvent

Dispatched on httpStatus.

ioErrorevent  
Event object type: flash.events.IOErrorEvent

Dispatched on an IO error.

progressevent  
Event object type: flash.events.ProgressEvent

Dispatched as a download progresses.

securityErrorevent  
Event object type: flash.events.SecurityErrorEvent

Dispatched on a security error.

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

Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.





 

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/collaboration/FileSubscriber.html