Packagecom.asfusion.mate.actions
Classpublic class AbstractServiceInvoker
InheritanceAbstractServiceInvoker Inheritance BaseAction Inheritance AbstractAction
SubclassesServiceInvoker, ServiceInvokerBuilder

AbstractServiceInvoker is the base class for all the IAction that have inner-handlers/actions.

This class has 2 inner-handlers resultHandlers and faultHandlers, but it provides the ability to have more by creating new inner-handlers with the method createInnerHandlers.



Public Properties
 PropertyDefined by
  debug : Boolean
Whether to show debugging information for its inner-handlerss.
AbstractServiceInvoker
  faultHandlers : Array
A set of inner-handlers to run when the server call returns a fault.
AbstractServiceInvoker
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
  resultHandlers : Array
A set of inner-handlers to run when the server call returns a result.
AbstractServiceInvoker
Protected Properties
 PropertyDefined by
  autoUnregistration : Boolean = true
When auto unregistration is true, all inner handlers will be unregistered after the first inner handlers fires.
AbstractServiceInvoker
  currentIndex : int = 0
Index used to store groups of inner handlers.
AbstractServiceInvoker
 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
  innerHandlersClass : Class
Class that is used as a template to create the inner-handlers
AbstractServiceInvoker
  innerHandlersDispatcher : IEventDispatcher
Dispatcher that will trigger the inner-handlers execution by dispatching events (ie: ResultEvent or FaultEvent).
AbstractServiceInvoker
  innerHandlersList : Array
Inner handlers list that stores all inner handlers indexed by the currentIndex.
AbstractServiceInvoker
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
  
Handler that will be fired when the first of the innerHandlers starts executing.
AbstractServiceInvoker
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
  
createInnerHandlers(scope:IScope, innerType:String, actionList:Array, innerHandlersClass:Class = null):IActionList
Creates IActionList and sets the properties: debug, type, listeners, dispatcher and inheritScope in the newly IActionList (inner-handlers).
AbstractServiceInvoker
  
prepare(scope:IScope):void
The first method that trigger calls.
AbstractServiceInvoker
 Inherited
run(scope:IScope):void
Where all the action occurs.
AbstractAction
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Property detail
autoUnregistrationproperty
protected var autoUnregistration:Boolean = true

When auto unregistration is true, all inner handlers will be unregistered after the first inner handlers fires.

currentIndexproperty 
protected var currentIndex:int = 0

Index used to store groups of inner handlers.

debugproperty 
debug:Boolean  [read-write]

Whether to show debugging information for its inner-handlerss. If true, console output will show debugging information for all inner-handlers (resultHandlers and faultHandlers)

The default value is false.

Implementation
    public function get debug():Boolean
    public function set debug(value:Boolean):void
faultHandlersproperty 
faultHandlers:Array  [read-write]

A set of inner-handlers to run when the server call returns a fault. Inside this inner-handlers, you can use the same tags you would in the main body of a IActionList, including other service calls.

The default value is null.

Implementation
    public function get faultHandlers():Array
    public function set faultHandlers(value:Array):void
innerHandlersClassproperty 
protected var innerHandlersClass:Class

Class that is used as a template to create the inner-handlers

The default value is EventHandlers.

innerHandlersDispatcherproperty 
protected var innerHandlersDispatcher:IEventDispatcher

Dispatcher that will trigger the inner-handlers execution by dispatching events (ie: ResultEvent or FaultEvent).

innerHandlersListproperty 
protected var innerHandlersList:Array

Inner handlers list that stores all inner handlers indexed by the currentIndex.

resultHandlersproperty 
resultHandlers:Array  [read-write]

A set of inner-handlers to run when the server call returns a result. Inside this inner-handlers, you can use the same tags you would in the main body of a IActionList, including other service calls.

The default value is null.

Implementation
    public function get resultHandlers():Array
    public function set resultHandlers(value:Array):void
Method detail
actionListStartHandler()method
protected function actionListStartHandler(event:ActionListEvent):void

Handler that will be fired when the first of the innerHandlers starts executing.

Parameters
event:ActionListEvent
createInnerHandlers()method 
protected function createInnerHandlers(scope:IScope, innerType:String, actionList:Array, innerHandlersClass:Class = null):IActionList

Creates IActionList and sets the properties: debug, type, listeners, dispatcher and inheritScope in the newly IActionList (inner-handlers).

Parameters
scope:IScope
 
innerType:String
 
actionList:Array
 
innerHandlersClass:Class (default = null)

Returns
IActionList
prepare()method 
protected override function prepare(scope:IScope):void

The first method that trigger calls. Usually, this is where the currentInstance is created or set if needed. In this method you can also perform any code that must be done first.

Parameters
scope:IScope