View comments | RSS feed
Packagemx.rpc
Interfacepublic interface IResponder
ImplementorsItemResponder

This interface provides the contract for any service that needs to respond to remote or asynchronous calls.



Public Methods
 MethodDefined by
  
fault(info:Object):void
This method is called by a service when an error has been received.
IResponder
  
This method is called by a service when the return value has been received.
IResponder
Method detail
fault()method
public function fault(info:Object):void

This method is called by a service when an error has been received. While info is typed as Object it is often (but not always) an mx.rpc.events.FaultEvent.

Parameters
info:Object
result()method 
public function result(data:Object):void

This method is called by a service when the return value has been received. While data is typed as Object, it is often (but not always) an mx.rpc.events.ResultEvent.

Parameters
data:Object




Comments


clintmodien said on Jul 20, 2006 at 10:08 PM :
in what instance would the data object in result(data:Object) not be of type mx.rpc.events.ResultEvent ?? vice versa FaultEvent ?
mpeterson said on Jul 31, 2006 at 12:52 PM :
In response to the previous comment,
The result() and fault() methods type their argument as Object for consistency with flash.net.Responder and for flexibility. In the RPC scenario, the info object is either a ResultEvent or FaultEvent, but in the DataService case, internal responders are defined that expect different types than these; which makes sense because different services generally need to support different interaction and data patterns. For example, the CommitResponder for DataService expects the info object passed to fault() to be a MessageFaultEvent, and the info object passed to result() to be a MessageEvent.

- Mike Peterson
Adobe Flex documentation team

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/2/langref/mx/rpc/IResponder.html