944,144 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3150
  • Java RSS
Mar 29th, 2005
0

Help with Direct and Indirect Communication

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
tat2dlady is offline Offline
32 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Basic help with Java class
Next Thread in Java Forum Timeline: Neone know where im going wrong !!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC