Packagecom.asfusion.mate.actions.builders
Classpublic class AsyncCommandInvoker
InheritanceAsyncCommandInvoker Inheritance AsyncMethodInvoker Inheritance MethodInvoker Inheritance ObjectBuilder Inheritance BaseAction Inheritance AbstractAction

AsyncCommandInvoker allows calling the execute method on the newly created EventDispatcher object or in the instance if one is provided. Because the method is asynchronous, we register to the success and fault events in this object and run the successHandlers or faultHandlers depending of the result. Unless you specify cache="none", this AsyncCommandInvoker instance will be "cached" and not instantiated again. If you are using an instance, the object is never generated and the same instance is used every time.



Public Properties
 PropertyDefined by
 Inheritedcache : String
The cache attribute lets you specify whether this newly created object should be kept live so that the next time an instance of this class is requested, this already created object is returned instead.
ObjectBuilder
 InheritedconstructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.
ObjectBuilder
 Inheriteddebug : Boolean
Whether to show debugging information for its inner-handlerss.
AsyncMethodInvoker
 InheritedfaultHandlers : Array
A set of inner-handlers to run when the call returns a fault.
AsyncMethodInvoker
 InheritedfaultType : String
Event type that will be used to register to the fault event.
AsyncMethodInvoker
 Inheritedgenerator : Class
The generator attribute specifies what class should be instantiated.
ObjectBuilder
 InheritedinnerHandlersClass : Class
Class that is used as a template to create the inner-handlers
AsyncMethodInvoker
 Inheritedinstance : IEventDispatcher
If this property is null, a new object instance is created on the prepare method.
AsyncMethodInvoker
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
 InheritedregisterTarget : Boolean
Registers the newly created object as an injector target.
ObjectBuilder
 InheritedsuccessHandlers : Array
A set of inner-handlers to run when the call returns a success.
AsyncMethodInvoker
 InheritedsuccessType : String
Event type that will be used to register to the success event.
AsyncMethodInvoker
Protected Properties
 PropertyDefined by
 InheritedcurrentIndex : int = 0
Index used to store groups of inner handlers.
AsyncMethodInvoker
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
 InheritedinnerHandlersList : Array
Inner handlers list that stores all inner handlers indexed by the currentIndex.
AsyncMethodInvoker
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
Handler that will be fired when the first of the innerHandlers starts executing.
AsyncMethodInvoker
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
 Inherited
createInnerHandlers(scope:IScope, innerType:String, actionList:Array, innerDispatcher:IEventDispatcher):IActionList
Creates IActionList and sets the properties: debug, type, listeners, dispatcher and inheritScope in the newly IActionList (inner-handlers).
AsyncMethodInvoker
 Inherited
createInstance(scope:IScope):Object
Where the currentInstance is created using the generator class as the template, passing arguments to the constructor as specified by the constructorArgs (if any).
ObjectBuilder
 Inherited
prepare(scope:IScope):void
The first method that trigger calls.
AsyncMethodInvoker
  
run(scope:IScope):void
Where all the action occurs.
AsyncCommandInvoker
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Method detail
run()method
protected override function run(scope:IScope):void

Where all the action occurs. At this moment, the currentInstance is already instantiated and all the properties are already set.

Parameters
scope:IScope