Can my remote client also serve as a remote object?

Mikael Jakobsson

Yes.

Just make sure your remote client is implemented as an RMI service, implementing a Remote interface and beeing exported as a UnicastRemoteObject (either by subclassing UnicastRemoteObject or by using the static exportObject() method of that class).

If this is done, a reference to the client can be sent to the server as a parameter of a server method, and the object will not be serialized as other parameters, but a remote reference is established.

The server can now call methods of the clients remote interface via this reference!
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


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

 

 

About | Sitemap | Contact