Also for reference, I list here the link to registry programs.
This is a zip code server, which maintains a list of city names and their corresponding zip codes (post codes). It can be initialised by a list of city-zip code pairs, after that we can either retrieve all of them or find the zip code of some city.
ZipCodeServer.java
the interface for the server of zip codes (post codes).
ZipCodeServerImpl.java
the implementation of the zip code server.
ZipCodeList.java A class used by ZipCodeServer
Note ZipCodeServerImpl.java does not have a main method. This is in accordance with the default testing procedure explained in Testing Method.
Here is a full code of a client program with which I wish to test your program.
This client and server allow us to receive a remote object reference as a result of a RMI and then invoke that object via RMI.
The original test was to have been a name server, but I have made it simpler as follows, which is essentially a ZipCodeServer which returns remote references. The ZipCodeRList server maintains a list of remote objects, each of which contains one city-zip code pair and a reference to the next remote object in the list. It can be asked "what is next", in which case, It returns a remote object reference to the next remote object in the list. It can also be asked to return its city-zip code pair or to add another remote object containing a given pair.
ZipCodeRList.java
(interface)
ZipCodeRListImpl.java
(implementation)
Here is a full code of a client program for ZipCodeRList with which I wish to test your program.
For those who wish to use the old test program, I also list their sources here. The reason for choosing not this but the above one is that the above one is simpler and is a little more fun for testing.
NameServer.java
(interface)
NameServerImpl.java
(implementation)