適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
mx.rpc 

AbstractInvoker  - AS3 Flex

套件mx.rpc
類別public class AbstractInvoker
繼承AbstractInvoker Inheritance EventDispatcher Inheritance Object
子類別 AbstractOperation, HTTPService

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

An invoker is an object that actually executes a remote procedure call (RPC). For example, RemoteObject, HTTPService, and WebService objects are invokers.



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
  lastResult : Object
[唯讀] The result of the last invocation.
AbstractInvoker
  makeObjectsBindable : Boolean
When this value is true, anonymous objects returned are forced to bindable objects.
AbstractInvoker
  operationManager : Function
This property is set usually by framework code which wants to modify the behavior of a service invocation without modifying the way in which the service is called externally.
AbstractInvoker
  resultElementType : Class
Like resultType, used to define the ActionScript class used by a given operation though this property only applies to operations which return a multi-valued result (e.g.
AbstractInvoker
  resultType : Class
Specifies an optional return type for the operation.
AbstractInvoker
公用方法
 方法定義自
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
EventDispatcher
  
Cancels the last service invocation or an invokation with the specified ID.
AbstractInvoker
  
clearResult(fireBindingEvent:Boolean = true):void
Sets the result property of the invoker to null.
AbstractInvoker
 Inherited
會將事件傳送到事件流程。
EventDispatcher
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
EventDispatcher
 Inherited
指出物件是否有已定義的指定屬性。
Object
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
會從 EventDispatcher 物件移除偵聽程式。
EventDispatcher
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
  
This hook is exposed to update the lastResult property.
AbstractInvoker
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
 Inherited
會傳回指定之物件的基本值。
Object
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
EventDispatcher
事件
 事件 摘要 定義自
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。EventDispatcher
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。EventDispatcher
屬性詳細資訊

lastResult

屬性
lastResult:Object  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The result of the last invocation.

此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 resultForBinding 事件。



實作
    public function get lastResult():Object

makeObjectsBindable

屬性 
makeObjectsBindable:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

When this value is true, anonymous objects returned are forced to bindable objects.



實作
    public function get makeObjectsBindable():Boolean
    public function set makeObjectsBindable(value:Boolean):void

operationManager

屬性 
public var operationManager:Function

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

This property is set usually by framework code which wants to modify the behavior of a service invocation without modifying the way in which the service is called externally. This allows you to add a "filter" step on the method call to ensure for example that you do not return duplicate instances for the same id or to insert parameters for performing on-demand paging. When this is set to a non-null value on the send call, the operationManager function is called instead. It returns the token that the caller uses to be notified of the result. Typically the called function will at some point clear this property temporarily, then invoke the operation again actually sending it to the server this time.

resultElementType

屬性 
public var resultElementType:Class

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Like resultType, used to define the ActionScript class used by a given operation though this property only applies to operations which return a multi-valued result (e.g. an Array or ArrayCollection (IList)). This property specifies an ActionScript class for the members of the array or array collection. When you set resultElementType, you do not have to set resultType. In that case, the operation returns an Array if makeObjectsbindable is false and an ArrayCollection otherwise.

resultType

屬性 
public var resultType:Class

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Specifies an optional return type for the operation. Used in situations where you want to coerce the over-the-wire information into a specific ActionScript class or to provide metadata for other services as to the return type of this operation.

方法詳細資訊

cancel

()方法
public function cancel(id:String = null):mx.rpc:AsyncToken

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Cancels the last service invocation or an invokation with the specified ID. Even though the network operation may still continue, no result or fault event is dispatched.

參數

id:String (default = null) — The messageId of the invocation to cancel. Optional. If omitted, the last service invocation is canceled.

傳回值
mx.rpc:AsyncToken — The AsyncToken associated with the call that is cancelled or null if no call was cancelled.

clearResult

()方法 
public function clearResult(fireBindingEvent:Boolean = true):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets the result property of the invoker to null. This is useful when the result is a large object that is no longer being used.

參數

fireBindingEvent:Boolean (default = true) — Set to true if you want anything bound to the result to update. Otherwise, set to false. The default value is true

setResult

()方法 
public function setResult(result:Object):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

This hook is exposed to update the lastResult property. Since lastResult is ordinarily updated automatically by the service, you do not typically call this. It is used by managed services that want to ensure lastResult always points to "the" managed instance for a given identity even if the the service returns a new copy of the same object.

參數

result:Object — The new value for the lastResult property.





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。