Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Why does java.rmi.Naming not implement interface java.rmi.Registry?

Reply
Thread Tools

Why does java.rmi.Naming not implement interface java.rmi.Registry?

 
 
Jan Schulze
Guest
Posts: n/a
 
      03-24-2005
The class Naming (from package java.rmi) provides the methods bind,
list, lookup etc. Those methods are defined in the interface Registry
(from package java.rmi). But according to the SDK API docs Naming does
not implement that interface. Is that true or a misprint? If it is
true, could anyone explain?

Regards
Jan
 
Reply With Quote
 
 
 
 
Esmond Pitt
Guest
Posts: n/a
 
      03-26-2005
Jan Schulze wrote:
> The class Naming (from package java.rmi) provides the methods bind,
> list, lookup etc. Those methods are defined in the interface Registry
> (from package java.rmi). But according to the SDK API docs Naming does
> not implement that interface. Is that true or a misprint? If it is
> true, could anyone explain?


There are two answers to this:

1. Because all the methods of Naming are static. Otherwise you would
have to get an instance of it, which would be the same as
LocateRegistry.getRegistry(), so what would be the point?

2. It doesn't strictly speaking implement the Registry interface,
because it understands (and returns) rmi:// URLs, where the Registry
interfaces only accept and return object names.

EJP
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesn't ArrayDeque implement the List interface? Joe Gottman Java 28 07-03-2011 10:20 PM
Why Re-implement Interface Tony Java 4 10-05-2007 05:27 AM
Discussion of why java.lang.Number does not implement Comparable Sideswipe Java 42 08-02-2007 02:24 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM



Advertisments