Java RMI Question - Possible to register a remote callback object?

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Look at the scenario below:

Assume that some client has aleady registerd a callback object by calling setSomeClass() on theFoo.
What happens when theFoo.bar() is called on the server? it's instance of SomeClass is 'living' in another JVM so when it in turn calls someClass.someMethod(...) will it cause changes to the client?
This may seem like a stupid questio, but I want to be sure before I proceed with this.
Most of the tutorials I've seen seem to give the impression that RMI is only good for `querying` the server and haven't found anything solid showing how the server can get the client to do something (the efffect I'm trying to achieve by registering a callback).

TIA.
 

znaps

Senior member
Jan 15, 2004
414
0
0
There are ways of doing what you want (make both ends RMI 'servers'), but why don't you try the code and see what happens?
 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Yeah, I'm reading an article on it right now.... looks Like I need to export the callback object on the client side to make it 'available' on the server side. Thanks znaps, will see how this works out.
Still not entirely sure if I should use RMI or TCP Sockets.... RMI seems a lil easier.....