This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Messaging a client on RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Messaging a client on RMI" Watch "Messaging a client on RMI" New topic
Author

Messaging a client on RMI

Hanna Habashy
Ranch Hand

Joined: Aug 20, 2003
Posts: 532
hi all
I am new to RMI, and I appreciate any help.
I have my server and client running. I want to notify clients with any errors that occurs on the server side. Like server restarted, or shuting down.
How can I send message to all clients currently connection to this server?
thanks


SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You would have to code it so each client registered with the server like a listener. Then the server could send them messages like events. This design means that each client has a Remote reference that gets the callback from the server for every event. Here's a more in-depth discussion on this topic.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Messaging a client on RMI
 
Similar Threads
RMI Server dying silently
RMI server send message to client
Take this Testing Tool for Data Class
Security in heterogeneous environment?
Implementaion of the interface provided by Sun to handle local and remote connections