Refer:
Thanks to Paul Krzyzanowski for
slides
.
Java RMI tutorial with a simple example.