Packageorg.puremvc.as3.utilities.loadup.model
Classpublic class LoadupResourceProxy
InheritanceLoadupResourceProxy Inheritance org.puremvc.as3.patterns.proxy.Proxy
Implementsorg.puremvc.as3.interfaces.IProxy

See the LoadupMonitorProxy class for the primary documentation on the Loadup utility. See the demo app called LoadupAsOrdered as an example of how LoadupResourceProxy can be used. In particular, see LoadResourcesCommand in that app.

It is assumed that the client application has a puremvc-compliant proxy object for each loadup resource, each uniquely named. Those objects must implement ILoadupProxy.

In addition, the app must instantiate a LoadupResourceProxy object for each loadup resource, with a reference to the ILoadupProxy object being passed to the constructor. These LoadupResourceProxy objects exist only for the purposes of the utility. How they are named is of no interest to the utility. Each of these objects should be registered with the puremvc model i.e. facade.registerProxy; this is absolutely required when the utility is used with puremvc multicore.

To specify dependencies between resources, use the requires property. For example, if we have 3 resources r1,r2,r3, and r3 requires that r1 and r2 must be loaded first, then we state r3.requires = [r1, r2];.

Assignment to the requires property is ignored if it occurs after a certain stage in the loading process as managed by LoadupMonitorProxy (the monitor), as follows

Each resource adopts a Retry Policy, to govern retries to load resources when a load attempt fails, and to govern application of timeouts on load attempts. The utility provides a particular RetryPolicy class that the client app can use, but the app could also implement its own in accordance with the IRetryPolicy interface. However, regardless of retry policy, there is a built-in assumption that automatic retries do not occur after timeout.

Use of the retryPolicy property is as follows

Adapted from original code of Daniele Ugoletti in his ApplicationSkeleton_v1.3 demo, Nov 2007, posted to the puremvc forums. Also from code of Joel Caballero, Feb 2008, posted to the forums.



Public Properties
 PropertyDefined by
  appResourceProxy : ILoadupProxy
[read-only]
LoadupResourceProxy
  monitor : LoadupMonitorProxy
LoadupResourceProxy
  requires : Array
LoadupResourceProxy
  retryPolicy : IRetryPolicy
LoadupResourceProxy
Public Methods
 MethodDefined by
  
LoadupResourceProxy(proxyName:String, appResourceProxy:ILoadupProxy)
LoadupResourceProxy
  
LoadupResourceProxy
  
LoadupResourceProxy
  
Public getter, to facilitate testing.
LoadupResourceProxy
  
isFailed():Boolean
LoadupResourceProxy
  
isLoaded():Boolean
LoadupResourceProxy
  
isLoading():Boolean
LoadupResourceProxy
  
isOkToLoad():Boolean
LoadupResourceProxy
  
isOkToReset():Boolean
LoadupResourceProxy
  
isOkToRetry():Boolean
LoadupResourceProxy
  
isOkToSetFailed():Boolean
LoadupResourceProxy
  
isOkToSetLoaded():Boolean
LoadupResourceProxy
  
isTimedOut():Boolean
LoadupResourceProxy
  
reset():void
LoadupResourceProxy
  
LoadupResourceProxy
  
LoadupResourceProxy
  
LoadupResourceProxy
  
LoadupResourceProxy
  
startLoad():void
LoadupResourceProxy
  
startRetry():void
LoadupResourceProxy
Property detail
appResourceProxyproperty
appResourceProxy:ILoadupProxy  [read-only]Implementation
    public function get appResourceProxy():ILoadupProxy
monitorproperty 
monitor:LoadupMonitorProxy  [read-write]Implementation
    public function get monitor():LoadupMonitorProxy
    public function set monitor(value:LoadupMonitorProxy):void
requiresproperty 
requires:Array  [read-write]Implementation
    public function get requires():Array
    public function set requires(value:Array):void
retryPolicyproperty 
retryPolicy:IRetryPolicy  [read-write]Implementation
    public function get retryPolicy():IRetryPolicy
    public function set retryPolicy(value:IRetryPolicy):void
Constructor detail
LoadupResourceProxy()constructor
public function LoadupResourceProxy(proxyName:String, appResourceProxy:ILoadupProxy)Parameters
proxyName:String
 
appResourceProxy:ILoadupProxy
Method detail
appResourceProxyName()method
public function appResourceProxyName():String

Returns
String
closeRequires()method 
public function closeRequires():void
getLoadingStartTime()method 
public function getLoadingStartTime():Number

Public getter, to facilitate testing.

Returns
Number
isFailed()method 
public function isFailed():Boolean

Returns
Boolean
isLoaded()method 
public function isLoaded():Boolean

Returns
Boolean
isLoading()method 
public function isLoading():Boolean

Returns
Boolean
isOkToLoad()method 
public function isOkToLoad():Boolean

Returns
Boolean
isOkToReset()method 
public function isOkToReset():Boolean

Returns
Boolean
isOkToRetry()method 
public function isOkToRetry():Boolean

Returns
Boolean
isOkToSetFailed()method 
public function isOkToSetFailed():Boolean

Returns
Boolean
isOkToSetLoaded()method 
public function isOkToSetLoaded():Boolean

Returns
Boolean
isTimedOut()method 
public function isTimedOut():Boolean

Returns
Boolean
reset()method 
public function reset():void
setStatusToFailed()method 
public function setStatusToFailed():void
setStatusToLoaded()method 
public function setStatusToLoaded():void
setStatusToLoading()method 
public function setStatusToLoading():void
setStatusToTimedOut()method 
public function setStatusToTimedOut():void
startLoad()method 
public function startLoad():void
startRetry()method 
public function startRetry():void