How can I execute a callback after a set of asynchronous service calls complete?
In Flex, I'm making a set of asynchronous calls:
service.method1.send().addResponder(responder1);
service.meth开发者_JAVA技巧od2.send().addResponder(responder2);
service.method3.send().addResponder(responder3);
I want to execute some code after all of these service calls have returned (either success or failure, I don't care which). How can I do this?
Implement a CallResponder that will monitor the results from each responder & increment a variable in the listener after each result. When the variable hits three, execute some code.
精彩评论