Help with Direct and Indirect Communication

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2005
Posts: 31
Reputation: tat2dlady is an unknown quantity at this point 
Solved Threads: 0
tat2dlady tat2dlady is offline Offline
Light Poster

Help with Direct and Indirect Communication

 
0
  #1
Mar 29th, 2005
I have an assignment that I need to do that designs the necessary classes to facilitate an indirect blocking and non-blocking communication environment between threads (producers and consumers) using a bounded buffer whose size is defined at run time. I am to test the working of these classes by creating an environment where 2 producers and 2 consumers communicate with each other by arbitrarily choosing either blocking or non-blocking mode.

I also have to design the necessary classes to implement an emulated direct blocking and non-blocking communication between threads through a bounded buffer whose size is defined at run time. What this means is though the communication appears to be direct, in actual terms, it is implemented through a bounded buffer.

Does anyone know how to implement these examples in Java? I do not know Java but I get the concept of OOP. I do have pieces of code for creating the bounded buffer, the threads, and the mailbox (from my text boook).

One question I have is how do you ensure that the info sent by a particular producer for a particular consumer is delivered to that consumer? And be able to block until that is done? How do you match up the message from the producer to the consumer?

I am not sure how to implement the blocking or non-blocking methods. Thanks for any input anyone may have. It would be greatly appreciated.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2982 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC