Flex : Is it possible to stop a remote call?

人走茶凉 提交于 2019-12-01 12:32:39

问题


I search for a long time, but I still not found the answer.

In common case, we keep the token of a remote method call, Flex -> Java for example. But, if the client know that the current call is not needed anymore, how stopping the server processing ?

With an asyncToken, is it possible to stop a remote call ?

Thanks for your answer.


回答1:


As I understood it, an AsyncToken just provides extra data for some operation. You'll need to access that operation to cancel.

IF you're calling an HTTPService, you use the cancel() method.

If you're using a WebService, you should be able to call getOperation() method and then cancel() the corresponding operation.

If you're using a RemoteObject you should be able to call getOperation() method and then cancel() on the corresponding operation.



来源:https://stackoverflow.com/questions/9365165/flex-is-it-possible-to-stop-a-remote-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!