What actually is a 'callback' concept in RMI, and how does it work?
Implementing callbacks, however, is not without challenges -- particularly in a distributed-object environment like RMI. Callbacks are implemented in RMI by setting the client itself as an exportable remote object (that is, make it implement some remote interface), then registering a reference of this with the remote-server object. This way, the server can asynchronously invoke the remote methods of any connected client in the same way the client can asynchronously invoke the methods implemented within the remote-server objects. See the Dr. Dobb's article on "Implementing callbacks with Java RMI" for complete details.