# Darwin Open Systems: RMI Callback Demo

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".

1. The interface used by the client to register
2. The remote registration object implementation
3. The trivial remote server program
4. The interface the Registrar uses to call back to the client
5. All-in-one client of the Register, implementation of the ClientInterface, and server program
6. Building and Running instructions (.bat or .sh)