Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
ModuleManager

Package | mx.modules
Class | public class ModuleManager
Inheritance | ModuleManager Object

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The ModuleManager class centrally manages dynamically loaded modules. It maintains a mapping of URLs to modules. A module can exist in a state where it is already loaded (and ready for use), or in a not-loaded-yet state. The ModuleManager dispatches events that indicate module status. Clients can register event handlers and then call the `load()` method, which dispatches events when the factory is ready (or immediately, if it was already loaded).

Public Methods

| Method | Defined By
--- | --- | ---
|  | getAssociatedFactory(object:Object):IFlexModuleFactory [static] See if the referenced object is associated with (or, in the managed ApplicationDomain of) a known IFlexModuleFactory implementation. | ModuleManager
|  | getModule(url:String):IModuleInfo [static] Get the IModuleInfo interface associated with a particular URL. | ModuleManager

Method Detail

getAssociatedFactory | () | method

`public static function getAssociatedFactory(object:Object):IFlexModuleFactory`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

See if the referenced object is associated with (or, in the managed ApplicationDomain of) a known IFlexModuleFactory implementation.

Parameters

| `object:Object` — The object that the ModuleManager tries to create.

Returns

| `IFlexModuleFactory` — Returns the IFlexModuleFactory implementation, or `null` if the object type cannot be created from the factory.

getModule | () | method |

`public static function getModule(url:String):IModuleInfo`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Get the IModuleInfo interface associated with a particular URL. There is no requirement that this URL successfully load, but the ModuleManager returns a unique IModuleInfo handle for each unique URL.

Parameters

| `url:String` — A URL that represents the location of the module.

Returns

| `IModuleInfo` — The IModuleInfo interface associated with a particular URL.

Sun Mar 5 2017, 03:42 PM +11:00