本文介绍了CORBA ::使用IIOP获取客户端ORB地址和端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用IIOP协议在CORBA中进行了应用,我正在使用JDK 6的Java IDL组件,这是另一个ORB实现.

I have application in CORBA using IIOP protocol, i am using the Java IDL component of the JDK 6 , another ORB implementation.

使用Java语言实现客户端和服务器.

Implementation of both client and server in Java language.

JDK ORB实现中是否有任何方法可以从客户端获取ORB的主机和端口?服务器(ORB)代码?

Is there any way in the JDK ORB implementation to get the client ORB`s host and port from theserver (ORB)code ?

是否可以使用IIOP协议来获取客户端的主机和端口?

is there any way with use of IIOP protocol, get client the host and port ?

这是我们的工作,目的是识别客户以跟踪被请求的人

This is we are doing for identification of the client to track the who is requested

推荐答案

我认为没有任何可移植的方法可以做到这一点.我不知道,也许有针对您的特定ORB.回想一下,CORBA会非常努力地从应用程序中隐藏传输详细信息.该应用程序甚至可能没有使用IIOP,因此无论如何都无法获取TCP主机和端口信息.

I don't think there is any portable way to do this. Perhaps there is for your particular ORB, I don't know. Recall that CORBA tries very hard to hide the transport details from the application. The application may not even be using IIOP, and thus there would be no way to get TCP host and port information in any event.

您可能要考虑向IDL添加其他标识符参数,以便服务器可以识别客户端.您还可以考虑让客户端在服务器上调用注册"功能,然后服务器发出一个标识符,所有客户端必须在随后的调用中将该标识符传递回服务器.

You may want to consider adding additional identifier parameter(s) to your IDL so that the server can recognize clients. You may also consider making the clients call a "register" function on the server, and the server hands out an identifier that all clients must pass back to the server on subsequent calls.

此标识符可以像字符串或整数一样简单,也可以像服务器必须使用公共密钥进行验证的某种安全性令牌一样复杂.这完全取决于您的应用程序要求.

This identifier can be as simple as a string or integer, or as complicated as some kind of security token that the server has to validate with a public key. It all depends on your application's requirements.

这篇关于CORBA ::使用IIOP获取客户端ORB地址和端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 17:41