开发者

RMI understanding question

开发者 https://www.devze.com 2023-02-08 17:11 出处:网络
everyone. I got general idea about RMI, but still need to understand some detail开发者_开发百科s.

everyone. I got general idea about RMI, but still need to understand some detail开发者_开发百科s. 1) Who generates stub object: server or RMI registry? 2) Where does client get stub class to deserialize stub object? Thanks.


  1. RMI creates the stub when you export your remote object. If it extends UnicastRemoteObject this occurs on construction, otherwise it occurs when you call exportObject().

  2. As you aren't using rmic, the stub class is a dynamic proxy: java.lang.reflect.Proxy. The client already has that class in the JRE. So the client only needs the remote interface class and any application classes that it depends on, and so on recursively until closure.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号