AsyncMethodInvoker

AsyncMethodInvoker allows to calling an asynchronous function specified in the method attribute on the newly created EventDispatcher object or in the instance if that is provided. Because the method is asynchronous, we register to a success and falut events in this object and run the successHandlers or faultHandlers depending of the result. When you are making the asynchronous call, you can pass arguments to this function that come from a variety of sources, such as the event itself, a server result object, or any other value.Unless you specify cache="none", this AsyncMethodInvoker instance will be "cached" and not instantiated again. If you are using an instace we never generate the object and use the same instance.

Example:

 

Attributes

This tag inherits from MethodInvoker, as such all of MethodInvoker attributes work, plus the one listed below:

instance

An IEventDispatcher that will be called. If none is provided, a new instance will be created, just like it is in MethodInvoker.

successType

The event type that will be dispatched by the instance that should trigger the <successHandlers> inner tag execution.

faultType

The event type that will be dispatched by the instance that should trigger the <faultHandlers> inner tag execution.