You should investigate the various approaches to securing Remote
Procedure Call. You should pay particular attention to how to
integrate SSL with RMI. You should then use your research to design
and implement a secure chat client and server using RMI.