Packagecom.adobe.rtc.session
Classpublic class ConnectSession
InheritanceConnectSession Inheritance flash.events.EventDispatcher
ImplementsIConnectSession

ConnectSession is the "headless" variant of IConnectSession, responsible for the concrete implementation of the interface. Free of any dependency on DisplayObject/UIComponent, it is intended as the class to use when establishing sessions via ActionScript. Standard features of IConnectSession apply :

ConnectSession requires a call to login() in order to begin establishing and synchronizing a session to a Room (this in comparison to ConnectSessionContainer, which may login by default). To end the session, call logout(). If the session is disconnected without this method (for example, due to network or server failure), ConnectSession will automatically reconnect.

Creating a session via actionscript
  var auth:AdobeHSAuthenticator = new AdobeHSAuthenticator();
  auth.userName="AdobeIDusername";
  auth.password="AdobeIDpassword";
  var session:ConnectSession = new ConnectSession();
  session.roomURL="http://connect.acrobat.com/fakeRoom/";
  session.authenticator=auth;
  session.login();
        
  var webCam:WebCamera = new WebCamera();
  webCam.percentWidth = webCam.percentHeight = 100;
  addChild(webCam);
  

See also

com.adobe.rtc.session.IConnectSession
com.adobe.rtc.authentication.AdobeHSAuthenticator
com.adobe.rtc.sharedManagers.UserManager
com.adobe.rtc.sharedManagers.RoomManager
com.adobe.rtc.sharedManagers.StreamManager
com.adobe.rtc.sharedManagers.FileManager


Public Properties
 PropertyDefined by
  authenticator : AbstractAuthenticator
(Required) The authenticator through which login information is passed.
ConnectSession
  fileManager : FileManager
[read-only] The FileManager class for the current session.
ConnectSession
  initialRoomSettings : RoomSettings
The initial room settings for the current room.
ConnectSession
  isSynchronized : Boolean
[read-only] [Read-only] A variable that indicates whether or not the ConnectSession is fully synchronized with the service.
ConnectSession
  primarySession : IConnectSession
[static][read-only] ConnectSession.primarySession can be used in order to access the first IConnectSession instance created in a given application.
ConnectSession
  roomManager : RoomManager
[read-only] The RoomManager class for the current session.
ConnectSession
  roomURL : String
[Required] The URL of the room to which to connect.
ConnectSession
  streamManager : StreamManager
[read-only] The StreamManager class for the current session.
ConnectSession
  userManager : UserManager
[read-only] The UserManager class for the current session.
ConnectSession
Public Methods
 MethodDefined by
  
ConnectSession
  
login():void
Logs into the RTC service.
ConnectSession
  
logout():void
Logs out and disconnects from the session.
ConnectSession
Events
 EventSummaryDefined by
   Dispatched when the session is closed before any children (in the case of ConnectSessionContainer) are removed.ConnectSession
   Dispatched when there's an error on the server.ConnectSession
   The synchronizationChange is dispatched when:
  • When ConnectSession establishes a connection to the service and has fully synchronized the major room elements such as UserManager, RoomManager, StreamManager, and FileManager.
  • When the component loses its connection to the service.
ConnectSession
Public Constants
 ConstantDefined by
  BUILD_NUMBER : String = "0.91"
[static] The build number for beta bug reporting.
ConnectSession
Property detail
authenticatorproperty
authenticator:AbstractAuthenticator  [read-write]

(Required) The authenticator through which login information is passed.

Implementation
    public function get authenticator():AbstractAuthenticator
    public function set authenticator(value:AbstractAuthenticator):void
fileManagerproperty 
fileManager:FileManager  [read-only]

The FileManager class for the current session.

Implementation
    public function get fileManager():FileManager
initialRoomSettingsproperty 
initialRoomSettings:RoomSettings  [read-write]

The initial room settings for the current room. Note that this property only works the FIRST TIME the room receives a connection from an user with an owner role.

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

[Read-only] A variable that indicates whether or not the ConnectSession is fully synchronized with the service.

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

Implementation
    public function get isSynchronized():Boolean
primarySessionproperty 
primarySession:IConnectSession  [read-only]

ConnectSession.primarySession can be used in order to access the first IConnectSession instance created in a given application. In general, it is preferable to access a local instance of IConnectSession, which allows for multiple IConnectSessions to coexist in the application, but in a one-IConnectSession application or as a default, primarySession can be used.

Implementation
    public static function get primarySession():IConnectSession
roomManagerproperty 
roomManager:RoomManager  [read-only]

The RoomManager class for the current session.

Implementation
    public function get roomManager():RoomManager
roomURLproperty 
roomURL:String  [read-write]

[Required] The URL of the room to which to connect.

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

Implementation
    public function get roomURL():String
    public function set roomURL(value:String):void
streamManagerproperty 
streamManager:StreamManager  [read-only]

The StreamManager class for the current session.

Implementation
    public function get streamManager():StreamManager
userManagerproperty 
userManager:UserManager  [read-only]

The UserManager class for the current session.

Implementation
    public function get userManager():UserManager
Constructor detail
ConnectSession()constructor
public function ConnectSession()
Method detail
login()method
public function login():void

Logs into the RTC service. Calling login is required for using ConnectSession, as compared with ConnectSessionContainer, Which does so automatically.

logout()method 
public function logout():void

Logs out and disconnects from the session.

Event detail
closeevent 
Event object type: com.adobe.rtc.events.ConnectSessionEvent

Dispatched when the session is closed before any children (in the case of ConnectSessionContainer) are removed.

errorevent  
Event object type: com.adobe.rtc.events.SessionEvent

Dispatched when there's an error on the server.

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

The synchronizationChange is dispatched when:

Constant detail
BUILD_NUMBERconstant
public static const BUILD_NUMBER:String = "0.91"

The build number for beta bug reporting.





 

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/session/ConnectSession.html