Packagemx.rpc
Classpublic class AbstractOperation
InheritanceAbstractOperation Inheritance AbstractInvoker Inheritance EventDispatcher Inheritance Object
Subclasses Operation, Operation

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.

See also

mx.rpc.AbstractService
mx.rpc.remoting.RemoteObject
mx.rpc.soap.WebService


Public Properties
 PropertyDefined By
  arguments : Object
The arguments to pass to the Operation when it is invoked.
AbstractOperation
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedlastResult : Object
[read-only] The result of the last invocation.
AbstractInvoker
 InheritedmakeObjectsBindable : Boolean
When this value is true, anonymous objects returned are forced to bindable objects.
AbstractInvoker
  name : String
The name of this Operation.
AbstractOperation
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  service : AbstractService
[read-only] Provides convenient access to the service on which the Operation is being invoked.
AbstractOperation
Public Methods
 MethodDefined By
  
AbstractOperation(service:AbstractService = null, name:String = null)
Creates a new Operation.
AbstractOperation
 Inherited
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
 Inherited
cancel(id:String = null):AsyncToken
Cancels the last service invocation or an invokation with the specified id.
AbstractInvoker
 Inherited
clearResult(fireBindingEvent:Boolean = true):void
Sets the result property of the invoker to null.
AbstractInvoker
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
  
Executes the method.
AbstractOperation
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited Dispatched when Flash Player or an AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited Dispatched when Flash Player or an AIR application loses operating system focus and is becoming inactive.EventDispatcher
   Dispatched when an Operation call fails.AbstractOperation
   Dispatched when an Operation invocation successfully returns.AbstractOperation
Property Detail
argumentsproperty
public var arguments:Object

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.

nameproperty 
name:String  [read-write]

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
serviceproperty 
service:AbstractService  [read-only]

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
Constructor Detail
AbstractOperation()Constructor
public function AbstractOperation(service:AbstractService = null, name:String = null)

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)
 
name:String (default = null)
Method Detail
send()method
public function send(... args):AsyncToken

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

Returns
AsyncToken — AsyncToken Call using the asynchronous completion token pattern. The same object is available in the result and fault events from the token property.
Event Detail
fault Event
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Dispatched when an Operation call fails.

The FAULT event type.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue, calling preventDefault() from the associated token's responder.fault method will prevent the service or operation from dispatching this event
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.
faultThe Fault object that contains the details of what caused this event.
messageThe Message associated with this event.
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.
tokenThe token that represents the call to the method. Used in the asynchronous completion token pattern.
result Event  
Event Object Type: mx.rpc.events.ResultEvent
ResultEvent.type property = mx.rpc.events.ResultEvent.RESULT

Dispatched when an Operation invocation successfully returns.

The RESULT event type.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue, preventDefault() from the associated token's responder.result method will prevent the service or operation from dispatching this event
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.
message The Message associated with this event.
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.
resultResult that the RPC call returns.
tokenThe token that represents the indiviudal call to the method. Used in the asynchronous completion token pattern.