Remote Delegate Class

If anyone has checked any of my PureMVC Flex examples that connect to a Remote Service (usually ColdFusion) they will notice I use a delegate class as the gateway to ColdFusion from all of my Proxies. I have recently noticed that most of my examples on line (typically named RemoteDelegate.as) usually pass an Object as a parameter for the remote request and I have not uploaded a version to accept multiple arguments in the call from the proxy to the delegate and in turn the request to ColdFusion.

Below is a link to a more flexible RemoteDelegate.as Class which now handles multiple arguments to invoke a remote request. Obviously the delegate uses RemoteObject and so can be changed to a different destination so your not limited to just ColdFusion.

An example of how to invoke the RemoteDelegate within a proxy and make a remoting call is below.

1
2
3
4
5
private var remoteDelegate:RemoteDelegate;

remoteDelegate = new RemoteDelegate( this, CF_API );

remoteDelegate.call( "cfMethod", param1, param2, param3 );

RemoteDelegate.as

  • NOTE *

Thanks to docsultant for the dynamic method invocation heads up.

Comments