May 2001
Intermediate to advanced
1088 pages
30h 13m
English
You've already seen the two most important methods in the Naming class (the interface to the RMI Registry). They are rebind and lookup. The rebind method, of course, associates a name with a remote object. The Naming class also includes a bind method that associates a name with an object. The difference between bind and rebind is that bind fails if the Registry already contains an object with the same name. Depending on the application, you might not want to overwrite an existing name, and in those cases, you use bind instead of rebind.
To remove an entry from the RMI Registry, use the unbind method. You specify the name you want to remove, like this:
Naming.unbind("//flamingo/TestObject");
You can get a list of the names ...
Read now
Unlock full access