K
kittyhawk
Hi folks,
I want to trigger a method on some remote object via RMI to process
some data. But the client invoking the method should not block while
the remote object is processing. Instead, I would like the remote
object to notify the client as soon as the job is done.
Of course, one could hand over the client's reference so that the
remote object could invoke a client's method. But, first, the server
will block as long as the client is doing something in its called
method, and second, the client has to be accessible via RMI, too. The
latter fact even causes that the method is actually processed on the
server instead of on the client side. So, any System.out.println() will
show up on the server, not on the client.
I cann't span separate threads to do the callbacks. That's set. I have
also looked into some design patterns, but didn't find anything
suitable for RMI problems at first glance.
All I want is a simple notification mechanism. Non-blocking on the
client, non-blocking on the server. Just a ping from the server to the
client, like "Hey, job is done. Fetch your result."
Thanks in advance for any help!
Thomas
I want to trigger a method on some remote object via RMI to process
some data. But the client invoking the method should not block while
the remote object is processing. Instead, I would like the remote
object to notify the client as soon as the job is done.
Of course, one could hand over the client's reference so that the
remote object could invoke a client's method. But, first, the server
will block as long as the client is doing something in its called
method, and second, the client has to be accessible via RMI, too. The
latter fact even causes that the method is actually processed on the
server instead of on the client side. So, any System.out.println() will
show up on the server, not on the client.
I cann't span separate threads to do the callbacks. That's set. I have
also looked into some design patterns, but didn't find anything
suitable for RMI problems at first glance.
All I want is a simple notification mechanism. Non-blocking on the
client, non-blocking on the server. Just a ping from the server to the
client, like "Hey, job is done. Fetch your result."
Thanks in advance for any help!
Thomas