mx.rpc.remoting

# Operation - AS3 Flex

Package | mx.rpc.remoting
Class | public class Operation
Inheritance | Operation AbstractOperation AbstractInvoker EventDispatcher Object
Subclasses | Operation

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

An Operation used specifically by RemoteObjects. An Operation is 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 Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | argumentNames : Array An ordered list of the names of the arguments to pass to a method invocation. | Operation
|  | arguments : Object The arguments to pass to the Operation when it is invoked. | AbstractOperation
|  | concurrency : String The concurrency for this Operation. | Operation
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | lastResult : Object [read-only] The result of the last invocation. | AbstractInvoker
|  | makeObjectsBindable : Boolean [override] When this value is true, anonymous objects returned are forced to bindable objects. | Operation
|  | name : String The name of this Operation. | AbstractOperation
|  | 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
|  | properties : Object This is a hook primarily for framework developers to register additional user specified properties for your operation. | AbstractOperation
|  | 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
|  | service : AbstractService [read-only] Provides convenient access to the service on which the Operation is being invoked. | AbstractOperation
|  | showBusyCursor : Boolean Whether this operation should show the busy cursor while it is executing. | Operation

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | Operation(remoteObject:AbstractService = null, name:String = null) Creates a new Operation. | Operation
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | cancel(id:String = null):mx.rpc:AsyncToken [override] Cancels the last service invocation or an invokation with the specified ID. | Operation
|  | clearResult(fireBindingEvent:Boolean = true):void Sets the result property of the invoker to null. | AbstractInvoker
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | send(... args):mx.rpc:AsyncToken [override] Executes the method. | Operation
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | setResult(result:Object):void This hook is exposed to update the lastResult property. | AbstractInvoker
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | fault | Dispatched when an Operation call fails. | AbstractOperation
|  | result | Dispatched when an Operation invocation successfully returns. | AbstractOperation

Property Detail

### argumentNames

property

`public var argumentNames:Array`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

An ordered list of the names of the arguments to pass to a method invocation. Since the arguments object is a hashmap with no guaranteed ordering, this array helps put everything together correctly. It will be set automatically by the MXML compiler, if necessary, when the Operation is used in tag form.

### concurrency

property

`concurrency:String`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The concurrency for this Operation. If it has not been explicitly set the setting from the RemoteObject will be used.

Implementation
`public function get concurrency():String`
`public function set concurrency(value:String):void`

### makeObjectsBindable

property

`makeObjectsBindable:Boolean`[override]

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

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

Implementation
`override public function get makeObjectsBindable():Boolean`
`override public function set makeObjectsBindable(value:Boolean):void`

### showBusyCursor

property

`showBusyCursor:Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Whether this operation should show the busy cursor while it is executing. If it has not been explicitly set the setting from the RemoteObject will be used.

Implementation
`public function get showBusyCursor():Boolean`
`public function set showBusyCursor(value:Boolean):void`
Constructor Detail

### Operation

()
Constructor

`public function Operation(remoteObject:AbstractService = null, name:String = null)`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Creates a new Operation. This is usually done directly automatically by the RemoteObject when an unknown operation has been accessed. It is not recommended that a developer use this constructor directly.

Parameters

| `remoteObject:AbstractService` (default = `null`)`` — The RemoteObject object defining the service.
| `name:String` (default = `null`)`` — The name of the service.

Method Detail

### cancel

()
method

`override public function cancel(id:String = null):mx.rpc:AsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | 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.

Parameters

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

Returns

| `mx.rpc:AsyncToken` — The AsyncToken associated with the call that is cancelled or null if no call was cancelled.

### send

()
method

`override public function send(... args):mx.rpc:AsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

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.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00