SE 450 Fall 2001/2002

Week 9 Lecture Notes


Networking Basics


Java Networking(java.net.*)


Sockets


Remote Method Invocation (RMI) Overview


Remote Method Invocation (RMI) Details (p 435 in Jia)


Using RMI

  1. Define interface for remote object to act as contract between server and clients
  2. Implement the interface from (1) in another class
  3. Create an instance of the server object and register it with the RMI registry using rebind()
  4. Generate the stub and skeleton classes using the RMI compiler (rmic)
  5. Develop a client that uses the remote object
  6. Compile both your server and client code.
  7. Distribute code
  8. Start up the RMI registry (rmiregistry)
  9. Start up the client code
Example - An applet that communicates with a server via RMI
Note: This may not work if the RMI server is not running.

Other Java Based Network Technologies