If i want to enable 'two way' communication in my RMI Application (That is, allow the server to invoke methods on the client, as well as the client to invoke methods on the server), is the simplest way to make the client into a Remote class as well?
Also if i intend to pass instances of my client to server as a method parameter, am i correct in thinking that there is no need to add the 'client class' to the rmiregistry?
And one final question, do all of my classes still need to be compiled in the same place? I.E can i compile server and client on two entirely independent machines and expect them to communicate properly?
* EDIT **
One more question, my question makes reference to my client interface (IClient): it has an arraylist (so i have ArrayList<IClient>
) to store new instances of the client so the server can keep track of registered clients. When i attempt to compile the server on a different machine, it complains that it cant find IClient - obviously, as IClient is on the client machine. How do i get around this?