Packageorg.flexunit.runner.external
Classpublic class ExternalDependencyToken
InheritanceExternalDependencyToken Inheritance Object

ExternalDependencyToken follows a pattern similar to the AsyncToken in Flex to notify interested resolvers when a dependency has been resolved.



Public Properties
 PropertyDefined By
  targetField : Field
The field where the final data loaded from this external dependency will reside
ExternalDependencyToken
Public Methods
 MethodDefined By
  
Constructor
ExternalDependencyToken
  
Adds a IExternalDependencyResolver to this token to be notified when success or failure occurs
ExternalDependencyToken
  
notifyFault(errorMessage:String):void
Notifies the resolver of a failure
ExternalDependencyToken
  
notifyResult(data:Object = null):void
Notifies the resolver of successful data retrieval
ExternalDependencyToken
  
Removes a IExternalDependencyResolver so that it will no longer be notified of future success or failure
ExternalDependencyToken
Property Detail
targetFieldproperty
targetField:Field

The field where the final data loaded from this external dependency will reside


Implementation
    public function get targetField():Field
    public function set targetField(value:Field):void
Constructor Detail
ExternalDependencyToken()Constructor
public function ExternalDependencyToken()

Constructor

Method Detail
addResolver()method
public function addResolver(adr:IExternalDependencyResolver):void

Adds a IExternalDependencyResolver to this token to be notified when success or failure occurs

Parameters

adr:IExternalDependencyResolver — an IExternalDependencyResolver

notifyFault()method 
public function notifyFault(errorMessage:String):void

Notifies the resolver of a failure

Parameters

errorMessage:String — is a string with a description of the fault

notifyResult()method 
public function notifyResult(data:Object = null):void

Notifies the resolver of successful data retrieval

Parameters

data:Object (default = null) — Only needed when using an IExternalDependencyLoader and not an IExternalDependencyValue

removeResolver()method 
public function removeResolver(adr:IExternalDependencyResolver):void

Removes a IExternalDependencyResolver so that it will no longer be notified of future success or failure

Parameters

adr:IExternalDependencyResolver — IExternalDependencyResolver