套件 | com.adobe.icc.token |
介面 | public interface IAsyncToken |
語言版本: | ActionScript 3.0 |
產品版本: | Asset Composer Building Block 9.5 |
執行階段版本: | AIR (unsupported), 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 may expect the token's success or fault handlers to be called depending on the result of the method call. Handlers will be called in the order in which they were added.
屬性 | 定義自 | ||
---|---|---|---|
data : Object
Associates custom data to this token. | IAsyncToken | ||
operationName : String [唯讀]
Returns the operation name associated with this token or null if an operation name was not given. | IAsyncToken |
方法 | 定義自 | ||
---|---|---|---|
Adds a fault handler to this token. | IAsyncToken | ||
Adds a success and a fault handler to this token. | IAsyncToken | ||
從下列版本以後不建議使用: 1.0: 請使用 addHandlers, or addSuccessHandler/addFaultHandler
Adds a responder to this token. | IAsyncToken | ||
Adds a success handler to this token. | IAsyncToken |
data | 屬性 |
operationName | 屬性 |
addFaultHandler | () | 方法 |
public function addFaultHandler(fault:Function):void
語言版本: | ActionScript 3.0 |
產品版本: | Asset Composer Building Block 9.5 |
執行階段版本: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Adds a fault handler to this token.
參數
fault:Function — The function to call on fault. Can be null, but it's not recommended to ignore a possible fault unless
you are certain the call will not fail. Expected function signature: function(fault:Object) .
|
addHandlers | () | 方法 |
public function addHandlers(success:Function, fault:Function):void
語言版本: | ActionScript 3.0 |
產品版本: | Asset Composer Building Block 9.5 |
執行階段版本: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Adds a success and a fault handler to this token. This is a convenience over having to explicitly call addSuccessHandler()
and addFaultHandler() after receiving an IToken. With this, you can simply do
asyncMethod().addHandlers(function(event:ResultEvent){}, function(event:FaultEvent){});
參數
success:Function — The function to call on success. Can be null, but it's rare you wouldn't want to know about success.
Expected function signature: function(data:Object) .
| |
fault:Function — The function to call on fault. Can be null, but it's not recommended to ignore a possible fault unless
you are certain the call will not fail. Expected function signature: function(fault:Object) .
|
addResponder | () | 方法 |
public function addResponder(responder:IResponder):void
語言版本: | ActionScript 3.0 |
產品版本: | Asset Composer Building Block 9.5 |
執行階段版本: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Adds a responder to this token. Unfortunately, this method is necessary due to the refactoring effort required in cmAdmin in order to call addHandlers (or addSuccessHandler and addFaultHandler) instead.
參數
responder:IResponder — The responder to add. This defines a result (success) and a fault handler to call on success or on fault,
respectively.
|
addSuccessHandler | () | 方法 |
public function addSuccessHandler(success:Function):void
語言版本: | ActionScript 3.0 |
產品版本: | Asset Composer Building Block 9.5 |
執行階段版本: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Adds a success handler to this token.
參數
success:Function — The function to call on success. Can be null, but it's rare you wouldn't want to know about success.
Expected function signature: function(data:Object) .
|
Tue Jun 12 2018, 03:47 PM Z