API Documentation | All Packages | All Classes | Index | Frames No Frames |
ExternalDependencyToken

Package | org.flexunit.runner.external
Class | public class ExternalDependencyToken
Inheritance | ExternalDependencyToken Object

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

Public Properties

| Property | Defined By
--- | --- | ---
|  | targetField : Field The field where the final data loaded from this external dependency will reside | ExternalDependencyToken

Public Methods

| Method | Defined By
--- | --- | ---
|  | ExternalDependencyToken() Constructor | ExternalDependencyToken
|  | addResolver(adr:IExternalDependencyResolver):void 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
|  | removeResolver(adr:IExternalDependencyResolver):void Removes a IExternalDependencyResolver so that it will no longer be notified of future success or failure | ExternalDependencyToken

Property Detail

targetField | property

`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

Thu Apr 10 2014, 08:07 AM +10:00