在远程方法调用期间,Java 平台是否会用其 stub
替换所有远程对象?在RMI
期间,我们知道,JVM
创建了一个stub
方法来调用和调用者方法,我的问题是,在函数被调用之后,然后 stub 之间通过网络套接字进行通信,因此在将结果返回到远程对象时,是否所有远程对象都被其 stub 替换?
提前致谢。
最佳答案
Does the Java platform replace all remote objects with their stubs during a remote method invocation?
所有导出远程对象,是的,在编码参数或结果对象期间。
During RMI we know that, JVM creates a stub methods for calling and caller methods
不完全是。当导出远程对象时,RMI 会为该对象创建 stub 对象。
my question is that, after function get called then the then communication happens between stubs through networking sockets
没有。它发生在客户端的 stub 和服务器的 RMI 运行时系统之间。
so that at the time returning result to the remote object, is that all remote objects are replaced by their stubs?
现在这是正确的,但不是因为你给出的原因。
关于java - 在远程方法调用期间,Java 平台是否用其 stub 替换所有远程对象?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14333467/