Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The AbstractOperation class represents an individual method on a
service. An Operation can be called either by invoking the function of the
same name on the service or by accessing the Operation as a property on the
service and calling the
send()
method.
public var arguments:Object
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The arguments to pass to the Operation when it is invoked. If you call
the send()
method with no parameters, an array based on
this object is sent. If you call the send()
method with
parameters (or call the function directly on the service) those
parameters are used instead of whatever is stored in this property.
For RemoteObject Operations the associated argumentNames array determines
the order of the arguments passed.
name:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The name of this Operation. This is how the Operation is accessed off the
service. It can only be set once.
Implementation public function get name():String
public function set name(value:String):void
public var properties:Object
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
This is a hook primarily for framework developers to register additional user
specified properties for your operation.
service:AbstractService
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Provides convenient access to the service on which the Operation
is being invoked. Note that the service cannot be changed after
the Operation is constructed.
Implementation public function get service():AbstractService
public function AbstractOperation(service:AbstractService = null, name:String = null)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Creates a new Operation. This is usually done directly by the MXML
compiler or automatically by the service when an unknown Operation has
been accessed. It is not recommended that a developer use this
constructor directly.
Parameters | service:AbstractService (default = null ) — The service on which the Operation is being invoked.
|
|
| name:String (default = null ) — The name of the new Operation.
|
public function send(... args):mx.rpc:AsyncToken
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Executes the method. Any arguments passed in are passed along as part of
the method call. If there are no arguments passed, the arguments object
is used as the source of parameters.
Parameters
| ... args — Optional arguments passed in as part of the method call. If there
are no arguments passed, the arguments object is used as the source of
parameters.
|
Returns | mx.rpc:AsyncToken — AsyncToken object.
The same object is available in the result and
fault events from the token property.
|
Event Object Type: mx.rpc.events.FaultEvent
property FaultEvent.type = mx.rpc.events.FaultEvent.FAULT
Language Version: | ActionScript 3.0 |
Runtime Versions: | 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. |
Event Object Type: mx.rpc.events.ResultEvent
property ResultEvent.type = mx.rpc.events.ResultEvent.RESULT
Language Version: | ActionScript 3.0 |
Runtime Versions: | 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. |
© 2009 Adobe Systems Incorporated. All rights reserved.
Sat Oct 3 2009, 04:15 AM -07:00