Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
mx.rpc 

AsyncToken  - AS3 Flex

Paquetemx.rpc
Clasepublic dynamic class AsyncToken
HerenciaAsyncToken Inheritance EventDispatcher Inheritance Object
Subclases CacheToken, ItemReference, RCAToken

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 class provides a place to set additional or token-level data for asynchronous RPC operations. It also allows an IResponder to be attached for an individual call. The AsyncToken can be referenced in ResultEvent and FaultEvent from the token property.



Propiedades públicas
 PropiedadDefinido por
 Inheritedconstructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada.
Object
  message : IMessage
[solo lectura] Provides access to the associated message.
AsyncToken
  responders : Array
[solo lectura] An array of IResponder handlers that will be called when the asynchronous request completes.
AsyncToken
  result : Object
[solo lectura] The result that was returned by the associated RPC call.
AsyncToken
Métodos públicos
 MétodoDefinido por
  
AsyncToken(message:IMessage = null)
Constructs an instance of the token with the specified message.
AsyncToken
 Inherited
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
  
Adds a responder to an Array of responders.
AsyncToken
 Inherited
Distribuye un evento en el flujo del evento.
EventDispatcher
 Inherited
Comprueba si el objeto EventDispatcher tiene detectores registrados para un tipo concreto de evento.
EventDispatcher
 Inherited
Indica si un objeto tiene definida una propiedad especificada.
Object
  
Determines if this token has at least one mx.rpc.IResponder registered.
AsyncToken
 Inherited
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro.
Object
 Inherited
Indica si existe la propiedad especificada y si es enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Elimina un detector del objeto EventDispatcher.
EventDispatcher
 Inherited
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle.
Object
 Inherited
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional.
Object
 Inherited
Devuelve la representación de cadena del objeto especificado.
Object
 Inherited
Devuelve el valor simple del objeto especificado.
Object
 Inherited
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
Eventos
 Evento Resumen Definido por
 Inherited[evento broadcast] Se distribuye cuando Flash Player o AIR pasan a estar activos.EventDispatcher
 Inherited[evento broadcast] Se distribuye cuando Flash Player o de AIR pasan a estar inactivos.EventDispatcher
  Dispatched when a property of the channel set changes.AsyncToken
Información sobre propiedades

message

propiedad
message:IMessage  [solo lectura]

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

Provides access to the associated message.



Implementación
    public function get message():IMessage

responders

propiedad 
responders:Array  [solo lectura]

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

An array of IResponder handlers that will be called when the asynchronous request completes. Eaxh responder assigned to the token will have its result or fault function called passing in the matching event before the operation or service dispatches the event itself. A developer can prevent the service from subsequently dispatching the event by calling event.preventDefault(). Note that this will not prevent the service or operation's result property from being assigned.



Implementación
    public function get responders():Array

result

propiedad 
result:Object  [solo lectura]

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

The result that was returned by the associated RPC call. Once the result property on the token has been assigned it will be strictly equal to the result property on the associated ResultEvent.

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 result():Object
Información sobre constructores

AsyncToken

()Información sobre
public function AsyncToken(message:IMessage = null)

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

Constructs an instance of the token with the specified message.

Parámetros
message:IMessage (default = null) — The message with which the token is associated.
Información sobre métodos

addResponder

()método
public function addResponder(responder:IResponder):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

Adds a responder to an Array of responders. The object assigned to the responder parameter must implement mx.rpc.IResponder.

Parámetros

responder:IResponder — A handler which will be called when the asynchronous request completes.

Elementos de API relacionados

hasResponder

()método 
public function hasResponder():Boolean

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

Determines if this token has at least one mx.rpc.IResponder registered.

Valor devuelto
Boolean — true if at least one responder has been added to this token.
Información sobre eventos

propertyChange

Evento
Tipo de objeto de evento: mx.events.PropertyChangeEvent
propiedad PropertyChangeEvent.type = mx.events.PropertyChangeEvent.PROPERTY_CHANGE

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 a property of the channel set changes.

The PropertyChangeEvent.PROPERTY_CHANGE constant defines the value of the type property of the event object for a PropertyChange event.

The properties of the event object have the following values:

PropertyValue
bubblesDetermined by the constructor; defaults to false.
cancelableDetermined by the constructor; defaults to false.
kindThe kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE.
oldValueThe original property value.
newValueThe new property value, if any.
propertyThe property that changed.
sourceThe object that contains the property that changed.
currentTargetThe 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.
targetThe 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.




[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.