• Post Reply Bookmark Topic Watch Topic
  • New Topic

Messaging a client on RMI  RSS feed

 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!