Paquete | mx.rpc |
Clase | public class CallResponder |
Herencia | CallResponder EventDispatcher Object |
Implementa | IResponder |
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
You set the token property of this component to the AsyncToken returned by the
service. You can then add event listeners on this component instead of having to
add them to each AsyncToken returned. This component also maintains the
lastResult property which is a copy of the value returned by the last successful
result event dispatched by a token monitored by this service. Though you can
bind to either the callResponder.token.result
or
callResponder.lastResult
, the latter will be preserved while a second
call to the same service is in progress while the former will be reset as soon
as a new service invocation is started.
Propiedad | Definido por | ||
---|---|---|---|
constructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada. | Object | ||
lastResult : *
This property stores the result property of the token each time it
delivers a successful result. | CallResponder | ||
token : mx.rpc:AsyncToken
Each CallResponder dispatches result and fault events received
from a single token. | CallResponder |
Método | Definido por | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un objeto de detector de eventos con un objeto EventDispatcher, de modo que el detector reciba la notificación de un evento. | EventDispatcher | ||
Distribuye un evento en el flujo del evento. | EventDispatcher | ||
This method is called by the AsyncToken when it wants to deliver a
FaultEvent to the CallResponder. | CallResponder | ||
Comprueba si el objeto EventDispatcher tiene detectores registrados para un tipo concreto de evento. | EventDispatcher | ||
Indica si un objeto tiene definida una propiedad especificada. | Object | ||
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro. | Object | ||
Indica si existe la propiedad especificada y si es enumerable. | Object | ||
Elimina un detector del objeto EventDispatcher. | EventDispatcher | ||
This method is called by the AsyncToken when it wants to deliver a
ResultEvent to the CallResponder. | CallResponder | ||
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle. | Object | ||
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional. | Object | ||
Devuelve la representación de cadena del objeto especificado. | Object | ||
Devuelve el valor simple del objeto especificado. | Object | ||
Comprueba si hay registrado un detector de eventos con este objeto EventDispatcher o con cualquiera de sus ascendientes para el tipo de evento concreto. | EventDispatcher |
Evento | Resumen | Definido por | ||
---|---|---|---|---|
[evento broadcast] Se distribuye cuando Flash Player o AIR pasan a estar activos. | EventDispatcher | |||
[evento broadcast] Se distribuye cuando Flash Player o de AIR pasan a estar inactivos. | EventDispatcher | |||
Dispatched when an Operation call fails. | CallResponder | |||
Dispatched when an Operation invocation successfully returns. | CallResponder |
lastResult | propiedad |
lastResult:*
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
This property stores the result property of the token each time it delivers a successful result. You can bind to or access this property instead of the token.result property to keep your code from seeing that value cleared out on the second and subsequent call to a particular service method. Additionally, if a fault occurs this value will still be set to the last successful result returned by a token monitored by this CallResponder.
Esta propiedad se puede utilizar como origen para la vinculación de datos. Cuando se modifica esta propiedad, distribuye el evento propertyChange
.
Implementación
public function get lastResult():*
public function set lastResult(value:any):void
token | propiedad |
token:mx.rpc:AsyncToken
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
Each CallResponder dispatches result and fault events received from a single token. This property value specifies that token. You typically set this property to the AsyncToken object returned by the service.
Esta propiedad se puede utilizar como origen para la vinculación de datos. Cuando se modifica esta propiedad, distribuye el evento propertyChange
.
Implementación
public function get token():mx.rpc:AsyncToken
public function set token(value:mx.rpc:AsyncToken):void
fault | () | método |
public function fault(data:Object):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
This method is called by the AsyncToken when it wants to deliver a
FaultEvent
to the CallResponder. You do not call
this method directly.
Parámetros
data:Object — The FaultEvent delivered by the AsyncToken
|
result | () | método |
public function result(data:Object):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
This method is called by the AsyncToken when it wants to deliver a
ResultEvent
to the CallResponder. You do not call
this method directly.
Parámetros
data:Object — The ResultEvent delivered by the AsyncToken
|
fault | Evento |
mx.rpc.events.FaultEvent
propiedad FaultEvent.type =
mx.rpc.events.FaultEvent.FAULT
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
Dispatched when an Operation call fails.
The FAULT event type.The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | true, calling preventDefault() from the associated token's responder.fault method will prevent the service or operation from dispatching this event |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
fault | The Fault object that contains the details of what caused this event. |
message | The Message associated with this event. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
token | The token that represents the call to the method. Used in the asynchronous completion token pattern. |
result | Evento |
mx.rpc.events.ResultEvent
propiedad ResultEvent.type =
mx.rpc.events.ResultEvent.RESULT
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | Flex 3 |
Versiones de motor de ejecución: | Flash Player 9, AIR 1.1 |
Dispatched when an Operation invocation successfully returns.
The RESULT event type.The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | true, preventDefault() from the associated token's responder.result method will prevent the service or operation from dispatching this event |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
message | The Message associated with this event. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
result | Result that the RPC call returns. |
token | The token that represents the indiviudal call to the method. Used in the asynchronous completion token pattern. |
Tue Jun 12 2018, 02:12 PM Z