简体   繁体   English

从存根获取RMI服务器地址

[英]Get RMI server address from the stub

I have a java RMI server which exports itself with UnicastRemoteObject.export. 我有一个Java RMI服务器,它通过UnicastRemoteObject.export导出自身。 Is there a way to find out the IP address that was embedded in the server stub? 有没有办法找出嵌入在服务器存根中的IP地址?

您的存根的默认toString将返回一些信息,如下所示:

Test1[UnicastServerRef [liveRef: [endpoint:[172.30.235.40:53209](local),objID:[-79d153e9:13ff67a80cc:-7fff, -4560008469324700920]]]]

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

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