The Responder interface declares the required methods for implementing a responder for remoting method calls. The RelayResponder implements this interface.
ExamplegotData and gotFault on the object specified within the constructor. import mx.rpc.Responder;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
class my.company.com.MyResponder extends Object implements Responder {
function MyResponder( obj:Object ) {
super();
_obj = obj;
}
function onResult( result:ResultEvent ): Void {
_obj.gotData( result );
}
function onFault( fault:FaultEvent ): Void {
_obj.gotFault( fault );
}
private var _obj:Object;
}
See Also
mx.rpc.RelayResponder
| Methods | |
| onFault(
fault:
mx.rpc.FaultEvent)
: Void This method is called when an error occurs during a remoting method call at the server. |
| onResult(
result:
mx.rpc.ResultEvent)
: Void This method is called when the results of a remoting method call have been returned to the client. |
| Method Detail |
onFault(
fault:
mx.rpc.FaultEvent)
: Void
Parameters
fault:
mx.rpc.FaultEvent - The FaultEvent constructed after the remote method fault has been returned
gotData and gotFault on the object specified within the constructor. import mx.rpc.Responder;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
class my.company.com.MyResponder extends Object implements Responder {
function MyResponder( obj:Object ) {
super();
_obj = obj;
}
function onResult( result:ResultEvent ): Void {
_obj.gotData( result );
}
function onFault( fault:FaultEvent ): Void {
_obj.gotFault( fault );
}
}
onResult(
result:
mx.rpc.ResultEvent)
: Void
Parameters
result:
mx.rpc.ResultEvent - The ResultEvent constructed after the remote method has been returned
gotData and gotFault on the object specified within the constructor. import mx.rpc.Responder;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
class my.company.com.MyResponder extends Object implements Responder {
function MyResponder( obj:Object ) {
super();
_obj = obj;
}
function onResult( result:ResultEvent ): Void {
_obj.gotData( result );
}
function onFault( fault:FaultEvent ): Void {
_obj.gotFault( fault );
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flashremoting/mx2004/actionscript_api_reference/mx/rpc/Responder.html