我在网上冲浪了。找不到任何合适的教程。
请解释一下:
如何使用RemoteObject.toStub(Remote rmo)动态创建远程对象的 stub ? 如何在客户端解释这些 stub 对象并节省运行 rmic 实用程序的任务。
最佳答案
How to use
RemoteObject.toStub(Remote rmo)
for dynamically creating stub of remote object?
你不知道。这只返回一个现有的 stub 。 stub 是在导出对象时创建的。在 UnicastRemoteObject
的 Javadoc 序言中指定的条件下, stub 是动态的。
How these stub objects are interpreted at client end and save the task of running rmic utility.
它们由java.lang.reflect.Proxy
创建,实现与远程对象相同的Remote
扩展接口(interface),并具有InitationHandler
code> 为您完成所有远程处理。客户端只是将其视为远程接口(interface)的实现。
关于java - RMI 远程对象到 stub ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28805976/