Before starting the client-server talk :
- I start rmiregistry on the server machine.
Then i start the server. In server code there is an instruction
Naming.rebind("MyServer",myServerImplementation)
. I read this statement binds the objectmyServerImplementation
with the classMyServer
and keeps it in the registry .Then i start the client
Naming.lookup(serverURL)
. I know that this statement looks up for the remote object in the registry. I cast the returned object into the remote object.Using this reference of remote object i call a remote method
greet
.Can you explain how this call is routed to the function of the remote object. Is there any role rmiregistry plays to route this call? What role does skeleton play to route this call ?