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?

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:

  1. Lookup the server using the Naming.lookup as usual
  2. call the server method: server.registerClient(theRemoteClientObject);
Now, the server will receive a remote reference in the registerClient() method, that can be used for callbacks to the client.

Of course, you'll also have to generate the stub and skeleton files for the client as well as the server using rmic.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact