I need an Object
to be asynchronously notified when some BlockingQueue
has got an item to give.
I\'ve searched both Javadoc and the web for a p
This looks like a good standard pattern for queue blocking and listeners. You make a good choice of making the listener interface. If you are not using the BlockingQueue class (which I am not clear of), the only thing is that you have manage is the correct wait()
and notify()
for managing the blocking call.
This particular SO Question "A simple scenario using wait() and notify() in java" provides a good overview on wait and notify and the usage related to BlockingQueue