gpt4 book ai didi

java - RMI 远程对象到 stub

转载 作者:行者123 更新时间:2023-12-01 11:51:16 24 4
gpt4 key购买 nike

我在网上冲浪了。找不到任何合适的教程。

请解释一下:

如何使用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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com