Is there any way I can send a remote object through RMI to the server that the server can then use to trigger a callback at the client?
Created May 4, 2012
Mikael Jakobsson Yes, you can!
Let the server have a method, let's call it registerClient(ClientRemoteInterface)
.
The client is also a remote object, with ClientRemoteInterface
as its remote interface.
From the client:
- Lookup the server using the Naming.lookup as usual
- call the server method: server.registerClient(theRemoteClientObject);
Of course, you'll also have to generate the stub and skeleton files for the client as well as the server using rmic.