Package | com.asfusion.mate.actions.builders |
Class | public class DelegateInvoker |
Inheritance | DelegateInvoker ServiceInvokerBuilder AbstractServiceInvoker BaseAction AbstractAction |
Implements | IAction |
Property | Defined by | ||
---|---|---|---|
arguments : *
The property
arguments allows you to pass an Object or an Array of objects
when calling the function defined in the property method . | DelegateInvoker | ||
cache : 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.
| ServiceInvokerBuilder | ||
constructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor
when the instance is created.
| ServiceInvokerBuilder | ||
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 | ||
generator : Class
The generator attribute specifies what class should be instantiated.
| ServiceInvokerBuilder | ||
instance : *
The instance of the Delegate to use.
| DelegateInvoker | ||
method : String
The
method attribute specifies what function to call on the delegate instance. | DelegateInvoker | ||
properties : ArrayProperties allows you to add properties to the currentInstance . | BaseAction | ||
registerTarget : Boolean
Registers the newly created object as an injector target.
| ServiceInvokerBuilder | ||
resultHandlers : Array
A set of inner-handlers to run when the server call returns a result.
| AbstractServiceInvoker | ||
showBusyCursor : Boolean = false
If true, a busy cursor is displayed while a service is executing.
| DelegateInvoker |
Property | Defined 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 | ||
currentInstance : * = null
The
currentInstance is the Object that this class will
use and modify to do its work. | AbstractAction | ||
document : 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 | ||
token : AsyncToken
Generated when making asynchronous RPC operations.
| DelegateInvoker |
Method | Defined by | ||
---|---|---|---|
Contructor
| DelegateInvoker | ||
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
| AbstractAction | ||
This method gets called when the IActionList (ex: EventHandlers) is running.
| AbstractAction |
Method | Defined by | ||
---|---|---|---|
actionListStartHandler(event:ActionListEvent):void
Handler that will be fired when the first of the innerHandlers starts executing.
| AbstractServiceInvoker | ||
The last method that
trigger calls. | DelegateInvoker | ||
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 | ||
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). | ServiceInvokerBuilder | ||
createResponder(token:AsyncToken, dispatcher:EventDispatcher):Responder
Creates a responder for a given token.
| DelegateInvoker | ||
The first method that
trigger calls. | DelegateInvoker | ||
Where all the action occurs.
| DelegateInvoker | ||
setProperties(scope:IScope):void
Where all the properties are set into the
currentInstance . | BaseAction |
arguments | property |
arguments:*
[read-write]
The property arguments
allows you to pass an Object or an Array of objects
when calling the function defined in the property method
.
You can use an array to pass multiple arguments or use a simple Object if the
signature of the method
has only one parameter.
The default value is undefined
.
public function get arguments():*
public function set arguments(value:*):void
instance | property |
instance:*
[read-write]The instance of the Delegate to use.
The default value is null
.
public function get instance():*
public function set instance(value:*):void
method | property |
method:String
[read-write]
The method
attribute specifies what function to call on the delegate instance.
The default value is null
.
public function get method():String
public function set method(value:String):void
showBusyCursor | property |
public var showBusyCursor:Boolean = false
If true, a busy cursor is displayed while a service is executing. The default value is false.
The default value is false
.
token | property |
protected var token:AsyncToken
Generated when making asynchronous RPC operations.
The same object is available in the result
and fault
events in
the token
property.
DelegateInvoker | () | constructor |
public function DelegateInvoker()
Contructor
complete | () | method |
protected override function complete(scope:IScope):void
The last method that trigger
calls.
This is your last chance to perform any action before the IActionList calls the next
IAction in the list.
scope:IScope |
createResponder | () | method |
protected function createResponder(token:AsyncToken, dispatcher:EventDispatcher):Responder
Creates a responder for a given token. When the responder is invoked, the data is converted into an event and dispatched by the dispatcher. This will then trigger the inner handlers since the dispatcher passed in will be the same dispatcher that the inner handlers are listening to.
Parameterstoken:AsyncToken |
|
dispatcher:EventDispatcher |
Responder |
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.
scope:IScope |
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.
scope:IScope |