关于 Jini API 的问题

发布于 2024-10-20 21:23:28 字数 100 浏览 5 评论 0原文

我正在尝试了解 java 中的 Jini API,但无法理解服务器和客户端如何交互,并且经常看到被称为“智能代理”的东西。什么是智能代理?客户端和服务器如何交互?

谢谢。

I am trying to learn about the Jini API in java, but can't get my head around how the server and client interact, and am constantly seeing things being referred to as "smart proxies". What are smart proxies? And how does the client and server interact ?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ㄖ落Θ余辉 2024-10-27 21:23:28

Jini 基于 Java RMI,因此客户端和服务器之间的通信就像在 RMI 中一样:在线上使用 RMI 协议进行请求/响应。

至于“智能代理”,Jini 编译器使用代理工厂为您的接口生成实现代码,其中包括用于发送和接收有关服务的元数据的 API。这种魔力使得客户端可以在网络上发出对某种服务的请求(例如“我想要一台彩色激光绘图仪”),并从响应中进行选择以找到可能的最佳匹配。

Jini is based on Java RMI, so clients and servers communicate with each other just as they do in RMI: request/response using RMI protocol on the wire.

As for the "smart proxies", the Jini compiler uses a proxy factory to generate implementation code for your interface that includes an API for sending and receiving meta data about services. This is the magic that makes it possible for a client to send out a request for a certain kind of service on the network (e.g. "I'd like a color laser plotter") and select from the responses to find the best match possible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文