패키지 | mx.collections |
클래스 | public class ItemResponder |
상속 | ItemResponder Object |
구현 | IResponder |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
mx.rpc.IResponder
interface.
It represents a responder that lets you specify methods to be
called when a request is completed, either successfully or with an error.
The class object can also lets you provide data (a token) to be used by
the responder methods.
You use an ItemResponder
object in the catch
statement
of a try block that might result in getting remote data, as shown in the following
code:
import mx.collections.ItemResponder;
//...
try
{
//...
cursor.moveNext();
}
catch(e:ItemPendingError)
{
e.addResponder(new ItemResponder(myResultFunction, myFaultFunction, {info:"..."}));
}
The result method specified must have the following signature:
public function myResultFunction(result:Object, token:Object = null):void;
The fault method specified must have the following signature:
public function myFaultFunction(error:Object, token:Object = null):void;
Any other signature will result in a runtime error.
관련 API 요소
공용 속성
공용 메서드
메서드 | 정의 주체 | ||
---|---|---|---|
Constructs an instance of the responder with the specified data and
handlers. | ItemResponder | ||
This method is called by a service when an error has been received. | ItemResponder | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
This method is called by a service when the return value has been
received. | ItemResponder | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object |
생성자 세부 정보
ItemResponder | () | 생성자 |
public function ItemResponder(result:Function, fault:Function, token:Object = null)
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructs an instance of the responder with the specified data and handlers.
매개 변수result:Function — Function that should be called when the request has
completed successfully.
Must have the following signature:
| |
fault:Function — Function that should be called when the request has
completed with errors.
Must have the following signature:
| |
token:Object (default = null ) — Object [optional] additional information to associate with
this request. This object is passed to the result and fault functions
as their second parameter.
|
메서드 세부 정보
fault | () | 메서드 |
result | () | 메서드 |
Tue Jun 12 2018, 03:17 PM Z