Package | com.adobe.icc.token |
Interface | public interface IAsyncToken |
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
By using an interface for basic token operations, methods can return different types of tokens without the caller needing to know what kind of token it is.
The caller can expect the token's success or fault handlers to be called depending on the result of the method call. Handlers are called in the order in which they were added.
Property | Defined By | ||
---|---|---|---|
data : Object
Associates custom data with this token. | IAsyncToken | ||
operationName : String [read-only] Returns the operation name associated with this token, or null if an operation name was not given. | IAsyncToken |
Method | Defined By | ||
---|---|---|---|
Adds a fault handler to this token. | IAsyncToken | ||
Adds a success and a fault handler to this token. | IAsyncToken | ||
Adds a success handler to this token. | IAsyncToken |
data | property |
operationName | property |
operationName:String
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Returns the operation name associated with this token, or null if an operation name was not given.
Implementation
public function get operationName():String
addFaultHandler | () | method |
public function addFaultHandler(fault:Function):void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Adds a fault handler to this token.
Parameters
fault:Function — The function to call on fault. Can be null, but it is not recommended that you ignore a possible fault unless
you are certain the call cannot fail. The expected function signature is function(fault:Object) .
|
addHandlers | () | method |
public function addHandlers(success:Function, fault:Function):void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Adds a success and a fault handler to this token. This is more convenient than explicitly calling addSuccessHandler()
and addFaultHandler() after receiving an IToken. This function allows you to simply use
asyncMethod().addHandlers(function(event:ResultEvent){}, function(event:FaultEvent){});
.
Parameters
success:Function — The function to call on success. Can be null, but in most cases you want to know about success.
The expected function signature is function(data:Object) .
| |
fault:Function — The function to call on fault. Can be null, but it is not recommended that you ignore a possible fault unless
you are certain the call cannot fail. The expected function signature is function(fault:Object) .
|
addSuccessHandler | () | method |
public function addSuccessHandler(success:Function):void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Adds a success handler to this token.
Parameters
success:Function — The function to call on success. Can be null, but in most cases you want to know about success.
The expected function signature is function(data:Object) .
|
Wed Nov 21 2018, 06:34 AM -08:00