  */
 class AuthenticationMessageResponder extends MessageResponder
 {
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    //
-    //--------------------------------------------------------------------------
+	//--------------------------------------------------------------------------
+	//
+	// Constructor
+	// 
+	//--------------------------------------------------------------------------
 
     public function AuthenticationMessageResponder(agent:MessageAgent,
                                 message:IMessage, channel:Channel, log:ILogger)
     {
-        super(agent, message, channel);
-        _log = log;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Variables
-    //
-    //--------------------------------------------------------------------------
-
+	    super(agent, message, channel);
+	    _log = log;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	// Variables
+	// 
+	//--------------------------------------------------------------------------
+    
     /**
      *  @private
      *  Reference to the logger for the associated Channel.
      */
     private var _log:ILogger;
-
+    
     //--------------------------------------------------------------------------
     //
     // Methods
-    //
+    // 
     //--------------------------------------------------------------------------
 
     /**
      *  Handles an authentication result.
-     *
+     * 
      *  @param msg The result Message.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion BlazeDS 4
-     *  @productversion LCDS 3 
      */
     override protected function resultHandler(msg:IMessage):void
     {

    /**
     * Channel property determines the level of performance information injection - whether
     * we inject message sizes or not.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get recordMessageSizes():Boolean
    {
        return _recordMessageSizes;
    }

    //----------------------------------
    //  reconnecting
    //----------------------------------

    /**
     *  @private
     */
    private var _reconnecting:Boolean = false;

    [Bindable(event="propertyChange")]
    /**
     *  Indicates whether this channel is in the process of reconnecting to an
     *  alternate endpoint.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get reconnecting():Boolean
    {
        return _reconnecting;
    }

    private function setReconnecting(value:Boolean):void
    {
        if (_reconnecting != value)
        {
            var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "reconnecting", _reconnecting, value);
            _reconnecting = value;
            dispatchEvent(event);
        }
    }

    //----------------------------------
    //  failoverURIs
    //----------------------------------

    /**
     *  @private
     */
    private var _failoverURIs:Array;

    /**
     *  Provides access to the set of endpoint URIs that this channel can
     *  attempt to failover to if the endpoint is clustered.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get failoverURIs():Array
    {
        return (_failoverURIs != null) ? _failoverURIs : [];
    }

    /**
     *  @private
     */
    public function set failoverURIs(value:Array):void
    {
        if (value != null)
        {
            _failoverURIs = value;
            _failoverIndex = -1; // Reset the index, because URIs have changed
        }
    }

    //----------------------------------
    //  id
    //----------------------------------

    /**
     *  @private
     */
    private var _id:String;

    /**
     *  Provides access to the id of this channel.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get id():String
    {
        return _id;
    }

    public function set id(value:String):void
    {
        if (_id != value)
            _id = value;
    }

    //----------------------------------
    //  authenticated
    //----------------------------------

    private var _authenticated:Boolean = false;

    [Bindable(event="propertyChange")]
    /**
     *  Indicates if this channel is authenticated.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get authenticated():Boolean
    {
        return _authenticated;
    }

    mx_internal function setAuthenticated(value:Boolean):void
    {
        if (value != _authenticated)
        {
            var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "authenticated", _authenticated, value);
            _authenticated = value;

            var cs:ChannelSet;
            for (var i:int = 0; i < _channelSets.length; i++)
            {
                cs = ChannelSet(_channelSets[i]);
                cs.mx_internal::setAuthenticated(authenticated, credentials)
            }

            dispatchEvent(event);
        }
    }

    //----------------------------------
    //  protocol
    //----------------------------------

    /**
     *  Provides access to the protocol that the channel uses.
     *
     *  <p><b>Note:</b> Subclasses of Channel must override this method and return
     *  a string that represents their supported protocol.
     *  Examples of supported protocol strings are "rtmp", "http" or "https".
     * </p>
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion BlazeDS 4
     *  @productversion LCDS 3 
     */
    public function get protocol():String
    {
        throw new IllegalOperationError("Channel subclasses must override "
            + "the get function for 'protocol' to return the proper protocol "
            + "string.");
    }

    //----------------------------------
    //  realtime
    //----------------------------------

    /**
     *  @private

                _connectTimer.addEventListener(TimerEvent.TIMER, connectTimeoutHandler);
                _connectTimer.start();
            }
            
            // We have to prevent a race between multipe Channel instances attempting to connect concurrently
            // at application startup. We detect this situation by testing whether the FlexClient Id has been assigned or not.
            if (FlexClient.getInstance().id == null)
