RMI 编程示例
我必须开发一个在服务器和客户端之间运行 RMI 的应用程序。 最初,服务器多播“活动”消息,客户端响应其当前状态(IP 和使用统计信息)。 当按下服务器 UI 上的按钮时,应在特定客户端上执行操作,然后客户端返回操作状态(通过 RMI 实现)
1.当前,我正在使用 isReachable(subnet) 发送多播活动消息并获取所有活跃客户的 IP。但是,如果没有套接字,我无法获得客户端的统计数据作为回报。有什么建议吗?
2.步骤1之后,如何执行RMI调用,以便在特定客户端上执行操作并返回状态?
由于这是该应用程序的初始版本,因此我目前没有使用 Jini 等程序。只是想设置一个基本版本并运行。
提前致谢!
I've to develop an application running RMI between a server and a client.
Initially, the server multicasts "alive" messages and clients respond with their current status(IP and usage statistics).
When a button is pressed on the server's UI, the operation should be executed on the specific client after which the client returns status of operation(implemented by RMI)
1.Currently, I'm sending out multicast alive messages-using isReachable(subnet) and getting IP's of all active clients. However without sockets, I'm unable to get the client's stats in return. Any suggestions?
2.After step 1, how do I execute the RMI call so that the operation is executed on the specific client and status returned?
Since this is an initial version of the application, I'm currently not using programs like Jini. Just want to set up a basic version up and running.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我用写了一个完整的程序
1. 用于网络发现
2.使用 RMI 和序列化来传输对象
I wrote out a whole program using
1. For network discovery
2. used RMI with serialization to transfer objects