• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get IP Address for the Client

 
rakesh nagar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have an RMI server, I need to figure out who is making calls to the server. I need to do some validation if the request is coming from a specific client.
Can someone please tell me how to get the IP address of the calling client in my server implementation.
Thanks
Rakesh
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably should make that a function of the server once the connection has been established. You can always return null or an error value if the client doesn't supply the correct IP or ID code when it makes a request. As far as I know, there isn't a way to do anything special in the registry based on the client IP. Now you may be able to subclass the registry and insert your own code, but that might be mroe than you want to tackle. I think you could just make the client IP or some ID based on an IP registration required for making requests on your server.
HTH
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!