This demonstration simulate a Stock Price notification service. In this demo, a client registers itself with a remote registry. The remote registry remembers the reference and, when it has information to share (faked up, for now, in its run method), it notifies the client by calling the "alert" method. Its important to notice that the ClientInterface is also a remote interface, so that the Register has a stub, to call the real ClientImpl (in ClientProgram), so that the output appears on the client side. If it were not a Remote object, the server would be given a copy, which would run on the server, and be unable to communicate directly with the server - not useful!
And notice that, since the Register only knows the client by its Interface, one could change the client implementation (to, say, a GUI with a pop-up window; this would be more attention-getting) without any changes to the Register program.
This type of callback scenario has many applications, including an RMI-based 'chat' program, and RMI-based "intelligent agents".