Packagecom.sibirjak.angara.core
Classpublic class ConnectionPool
InheritanceConnectionPool Inheritance flash.events.EventDispatcher

Manages all open loader connections.



Public Properties
 PropertyDefined by
  numFreeConnections : uint
[read-only] Returns the number of free connections.
ConnectionPool
Public Methods
 MethodDefined by
  
ConnectionPool(maxConnections:uint)
Creates a new ConnectionPool instance.
ConnectionPool
  
clear():void
Closes all open connections.
ConnectionPool
  
load(itemsToLoad:Array):void
Starts loading for each of the specified list of resource loaders.
ConnectionPool
  
toString():String
Info
ConnectionPool
Protected Methods
 MethodDefined by
  
Dispatches the LoaderItemEvent.REMOVE event.
ConnectionPool
Property detail
numFreeConnectionsproperty
numFreeConnections:uint  [read-only]

Returns the number of free connections.

This method is called by the LoaderManager. The pool will subsequently be filled by the number of resource loaders returned by this method.

The method will return zero if at least 1 resource loader defines a callback function. In such a case we have to wait for the callbacks finish before we continue loading other resources.

Implementation
    public function get numFreeConnections():uint
Constructor detail
ConnectionPool()constructor
public function ConnectionPool(maxConnections:uint)

Creates a new ConnectionPool instance.

Parameters
maxConnections:uint — The number of simultaneous http connections.
Method detail
clear()method
public function clear():void

Closes all open connections.

The method calls the stop() property of each containing resource loader. The loader is then supposed to dispatch a stop notification, which will remove it from the connection pool.

dispatchRemove()method 
protected function dispatchRemove():void

Dispatches the LoaderItemEvent.REMOVE event.

load()method 
public function load(itemsToLoad:Array):void

Starts loading for each of the specified list of resource loaders.

Parameters
itemsToLoad:Array — List of loaders to start loading.
toString()method 
public override function toString():String

Info

Returns
String