Here is the default testing method. By default I mean that you use the most basic path: using the ROR (remote object reference) and the registry I provided. If you use a different design the corresponding assessment will be done.
Note that even if you are not following this line of design, that is all right, as far as it is reasonable and, for testing, your programs you can do essentially the same thing. In that case, provide your own registry etc. so that you can give the demostration to the same effect.
Make one main program, which I call yourRMI. We use test programs which are listed here.
Assuming you hardwired the port (3021) which RMI listens to:
So yourRMI should take as its argument a class name, turn it into a class, create its instance and bind it to a registry. How can this be done? A basic framework is illustrated in the following programs. They also offer hints if you are really stuck in design etc. They assume one stub for each remote object, one skeleton (or none if you like) for each remote class, and that the port which RMI listens to is hard wired. Here are the programs yourRMI.java and RORtbl.java
where ZipCodeClient, given below, simply tests all
methods which are in the server: store data,
retrieve data, or print them. ZipCodeClient.java
For the ZipCodeRList, we have the following client program: ZipCodeRListClient.java
This program simply retrieves data from the remote
site and prints them. Both test programs use a data file:
a sample data file is given below. It is simply a list of
a city name and a zip code.
Here is some sample data .