RMI 回调 - 在线协议是什么?

RMI Callbacks - what is the on the wire protocol?

当 Java RMI 与客户端回调一起使用时,"on the wire"、TCP/IP 级协议是什么?

具体来说,服务器是向客户端发起单独的 TCP/IP 连接以进行回调,还是使用现有的 TCP/IP 连接?

这个引用:https://www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/rmi/spec/rmi-protocol.doc.html表示在RMI中封装了一个HTTPPOST来调用方法,是服务端做的HTTPPOST给客户端回调吗?

What is the "on the wire", TCP/IP level protocol when Java RMI is used with client callbacks?

JRMP:Java 远程方法协议,除非您使用 RMI/IIOP 或 JBoss 或 JERI 或其他具有不同 RMI 有线协议的东西。

Specifically, does the server initiate a separate TCP/IP connection to the client to make the callback

是的。

or is an existing TCP/IP connection used?

没有

This reference: https://www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/rmi/spec/rmi-protocol.doc.html indicates a HTTP POST is encapsulated in RMI to invoke the method, is the HTTP POST made by the server to the client for a callback?

您的 link 是 RMI 规范的极其古老的副本 (1997)。 current version, dated 2010 可直接从 Oracle 获得。它 实际上 表明它使用 HTTP POST 'when circumstances warrant',即作为直接 TCP 连接失败时的回退策略,并且仅在 RMI- CGI servlet 安装在目标上。

RMI内部没有RMI调用和回调的区别,所以是否使用HTTP隧道与是否回调无关,反之亦然。