17-05-2012, 11:25 AM
Naming and Parameter Passing with Java RMI
07_Naming_and_Parameter_Passing.ppt (Size: 759.5 KB / Downloads: 33)
A common solution
A common technique in distributed computing that allows a client to acquire a reference to a remote object is to use a naming service
A naming service provides a mapping from names to proxy objects; given a name the service returns the proxy object stored under that name
Java RMI provides a simple white-pages style naming service where names are (case-sensitive) strings
Class Naming
Naming is a convenience class that mirrors any Registry object
In response to a Naming method call (e.g. lookup), the following happens:
The name (URL) argument passed to a Naming method (e.g. lookup) is parsed and used as the argument to one of LocateRegistry’s get( ) methods
LocateRegistry returns a proxy object for the remote Registry object
The Naming class uses the proxy object to invoke the method (e.g. lookup) on the remote Registry object