• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

how can 2 client communicate each other using RMI

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends I know how to access a remote method from the client but i want to communicate 2 clients i dont know how to do that can anyone give me some idea or sample code for how v can make 2 clients to communicate throu server using RMI.I thought of doing a chat in LAN using the idea/concept.
Help Me Plz
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're going to need to implement something called a "remote listener" or "RMI callback" to do this. Someone else asked about this a few days ago, and that thread has a link to an example and further descriptions of this concept.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a nice simple example of a chat app (server and client) using Sockets. The problem is that it's about 350 lines of code (including comments (which are in Spanish but I'm not going to translate them)).

How should I get the code to you? Email?

Steve
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For more complicated communication beyond 2 person chat, you can use one of the APIs that work on top of RMI, such as Java Message Service, Jini or JavaSpaces.
Bill
 
Prasath Thirumoorthy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Steve thanks for ur rply it would be useful for me if it is in english how can i translate that code which is in spanish to english and i need the code in RMI thank u very much for ur help
with regards
prasath
 
reply
    Bookmark Topic Watch Topic
  • New Topic