简体   繁体   English

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

[英]RMI Callbacks - what is the on the wire protocol?

What is the "on the wire", TCP/IP level protocol when Java RMI is used with client callbacks? 当Java RMI与客户端回调一起使用时,TCP / IP级别的“在线”协议是什么?

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? 具体来说,服务器是否启动与客户端的单独TCP / IP连接以进行回调,还是使用现有的TCP / IP连接?

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? 该参考: https : //www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/rmi/spec/rmi-protocol.doc.html表示HTTP POST封装在RMI中以调用该方法,服务器对客户端进行的HTTP POST回调?

What is the "on the wire", TCP/IP level protocol when Java RMI is used with client callbacks? 当Java RMI与客户端回调一起使用时,TCP / IP级别的“在线”协议是什么?

JRMP: Java Remote Method Protocol, unless you're using RMI/IIOP or JBoss or JERI or something else with a different RMI wire protocol. JRMP:Java远程方法协议,除非您使用RMI / IIOP或JBoss或JERI或其他具有不同RMI有线协议的东西。

Specifically, does the server initiate a separate TCP/IP connection to the client to make the callback 具体来说,服务器是否启动与客户端的单独TCP / IP连接以进行回调

Yes. 是。

or is an existing TCP/IP connection used? 还是使用现有的TCP / IP连接?

No. 没有。

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? 该参考: https : //www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/rmi/spec/rmi-protocol.doc.html表示HTTP POST封装在RMI中以调用该方法,服务器对客户端进行的HTTP POST回调?

Your link is an extremely ancient copy (1997) of the RMI Specification. 您的链接是RMI规范的极其古老的副本(1997年)。 The current version, dated 2010 , is available directly at Oracle. 当前版本为2010最新版本可直接从Oracle获得。 What it actually indicates is that it uses HTTP POST 'when circumstances warrant', ie as a fallback strategy if a direct TCP connection fails, and that only works if the RMI-CGI servlet is installed at the target. 实际表明的是“在情况许可时”使用HTTP POST,即,如果直接TCP连接失败,则作为回退策略,并且仅当RMI-CGI Servlet安装在目标服务器上时才有效。

RMI has no internal distinction between RMI calls and callbacks, so whether or not HTTP tunnelling is used is irrelevant to whether it's a callback or not, and vice versa. RMI在RMI调用和回调之间没有内部区别,因此是否使用HTTP隧道与是否使用回调无关,反之亦然。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM