Can my remote client also serve as a remote object?
Created May 4, 2012
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!