Writing a Talk Server / Talk Client using Remote Method Invokation

Java Remote Method Invocation (RMI) allows a client application (or in the future, applets) to call methods on an object residing on a remote server as if it were a local object.

This assignment has the following parts:

  1. Write a RMI Talk Server and run it in the background.

  2. Write a client that will connect to that server and have the server will spawn off a talk window and establish a connection between the talk windows on the client side and server side.

  3. Make the server ``concurrent'' by having it continue to listen for connections while the two windows communicate.
An application becomes server by implementing a remote interface and extending a server reference class. The remote interface declares the methods that are available on that object to clients possessing a reference to that object. Each machine with an RMI server has a Registry residing on that maps the name of an object to an object reference. When a client desires to connect to a server it queries the Registry on the correct machine for an object with a certain name and uses the returned reference to make method calls on the remote object. stubs generated by the rmic (Remote Method Invokation Compiler) serve as a client side proxy to the remote object.

Script to run the RMI demo


References

For details on how to get started quickly, view the Quickstart Documentation.
For more complete information, browse the A HREF="http://chatsubo.javasoft.com/current/doc/tutorial/getstart.doc.html">Java RMI site.