RMI回调的真正优点是什么?
我已经阅读了很多有关 RMI 回调的内容,但我需要知道使用它的优点,以及是否有任何特殊的代码可以进行 RMI 回调?
I have read a lot about RMI call back but I need to know the advantages of using that and is there any special code for making RMI callback?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回调是一种模式,您所呼叫的人可以依次调用您的方法。这意味着您不必一次性向他发送他需要的所有数据:他可以询问您,并且在需要时他可以这样做,这可能是在您需要很长时间之后打电话给他。
话虽如此,除了在 LAN 内之外,RMI 回调在实践中并没有多大用处,因为回调通常是表面上的安全漏洞,并且通常被防火墙管理员禁止。所以不要对他们太热衷。
A callback is a pattern whereby the guy you have called can in turn call a method on you. It means that you don't have to ship him all the data he needs in one go: he can ask you, and he can do that when he needs it, which might be a long time after you call him.
Having said that, RMI callbacks aren't much use in practice except within LANs, as callbacks in general are a prima facie security breach and generally disallowed by firewall administrators. So don't get too keen on them.