软硬度:是否有可能阻止远程调用? [英] Flex : Is it possible to stop a remote call?

查看:142
本文介绍了软硬度:是否有可能阻止远程调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很长一段时间,但我仍然没有找到答案。

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

在通常情况下,我们保持一个远程方法调用,则Flex的象征 - > Java进行例子。 但是,如果客户知道,目前的呼叫不再需要,如何停止服务器处理?

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 ?

通过一个标记的AsyncToken,是否有可能阻止远程调用?

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

感谢您的回答。

推荐答案

据我的理解是,一个刚的AsyncToken提供额外的数据对于某些操作。您需要访问操作取消。

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

如果你调用一个<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html"相对=nofollow>的HTTPService ,您使用<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#cancel%28%29"相对=nofollow>取消()方法。

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

如果您使用的是<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/soap/mxml/WebService.html"相对=nofollow> WebService的,你应该能够调用<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/soap/mxml/WebService.html#getOperation%28%29"相对=nofollow> getOperation()方法,然后<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/AbstractInvoker.html#cancel%28%29"相对=nofollow>取消()进行相应的操作。

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

如果您使用的是<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/remoting/RemoteObject.html"相对=nofollow> RemoteObject的你应该能够调用<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/remoting/RemoteObject.html#getOperation%28%29"相对=nofollow> getOperation()方法,然后<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/AbstractInvoker.html#cancel%28%29"相对=nofollow>取消相应的操作()。

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

这篇关于软硬度:是否有可能阻止远程调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆