If I want to enable the two-way relationship in my RMI application (that is, allow the server to call methods on the client, as well as the client to call methods on the server), is this the easiest way to make the client into the Remote class as well?
Also, if I intend to pass instances of my client to the server as a parameter of the method, do I correctly think that there is no need to add a "client class" to rmiregistry?
And one last question, do all my classes still need to be compiled in one place? I. Can I compile the server and client on two completely independent machines and expect them to communicate correctly?
* EDIT **
Another question, my question makes a link to my client interface (IClient): it has an arraylist (so I have an ArrayList<IClient> ) to store new client instances so that the server can track registered clients. When I try to compile the server on another computer, it complains that it cannot find IClient - obviously, since IClient is on the client machine. How do I get around this?
source share