RMI Interview Questions and Answers
Ques. Explain the various methods of registering and gaining access to the Remote Object.Ans. The methods of remote objects are to be invoked by implementing the java.rmi.Remote interface.
bind(): binds the specified name to the remote object. The name parameter of this method should be in an URL format.
unbind(): Destroys the binding for a specific name of a remote method in the registry
rebind(): Binds again the specified name to the remote object. The current binding will be replaced by rebinding.
list(): Returns the names of the names that were bound to the registry in an array form. These names are in the form of URL-formatted string.
lookup(): A stub, a reference will be returned for the remote object which is related with a specified name.
Is it helpful? Yes No
Most helpful rated by users: