Jini服务发现
在 Jini 服务发现中,您可以通过为要发现的服务类型的 class[] 提供 null 来搜索所有类型的服务。我的问题是,如果您的类路径中没有发现的服务接口,会发生什么情况。例如,在网络中有 2 个服务,其接口为 IService1 和 IService2,但两者都不在我的类路径中。当他们被发现时会发生什么?代码是否会从 HTTP 服务器下载到我的 JVM(假设它配置为指向 HTTP 服务器)?
(是的,我知道 Jini 已经死了:-))
谢谢!
In Jini service discovery, you can search for all types of services by providing null for the class[] of service types to discover. My question is what happens if you don't have in your classpath the discovered service interface. For example, in the network there are 2 service with the interfaces IService1 and IService2, both not in my classpath. What would happen when they are discovered? will the code be downloaded to my JVM from the HTTP server (assuming it is configured to point to the HTTP server)?
(yeah, I know Jini is pretty dead :-))
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能指的是服务查找。根据规范:“查找服务提供了神灵中可用服务的中央注册表。此查找服务是程序在神灵中查找服务的主要手段......”
至于发现:“希望开始参与由 JiniTM 技术支持的服务和/或设备(称为 djinn)的分布式系统的实体,必须首先获得对一个或多个 Jini 查找服务的引用。管理获取这些参考文献被称为发现协议。”
我认为你必须知道你想要使用的类型。你打算用一个你一无所知的界面做什么?
当您了解接口及其用途时,您就可以依赖它来构建程序。通过服务查找,您在 Jini 中得到的是该服务接口的实现。
我知道我的回答很粗略。我想引导您到 Jini 继续存在的地方:river.apache.org。 Jini 还活着,活得很好!使用规范、示例,当然还有邮件列表来获得详尽的答案。
干杯。
What you probably refer to is service lookup. From the spec: "The lookup service provides a central registry of services available within the djinn. This lookup service is a primary means for programs to find services within the djinn..."
As for disccovery: "Entities that wish to start participating in a distributed system of JiniTM technology-enabled services and/or devices, known as a djinn, must first obtain references to one or more Jini lookup services. The protocols that govern the acquisition of these references are known as the discovery protocols."
I think you have to know your types you want to use. What are you going to do with an interface you know no nothing about?
When you know the interface and what it is good for, you build your program relying on it. What you get in Jini by a service lookup is an implementation of that service interface.
I am aware my answer is sketchy. I would like to direct you to the place where Jini continues its existence: river.apache.org. Jini is live and well! Use the specifications, examples and of course the mailing lists to get an exhaustive answer.
Cheers.