Package com.sun.ts.tests.jms.common
Class DoneLatch
java.lang.Object
com.sun.ts.tests.jms.common.DoneLatch
Monitor class for asynchronous examples. Producer signals end of message stream; listener calls allDone() to notify
consumer that the signal has arrived, while consumer calls waitTillDone() to wait for this notification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
allDone()
Sets done to true.void
Waits until done is set to true.
-
Constructor Details
-
DoneLatch
public DoneLatch()
-
-
Method Details
-
waitTillDone
public void waitTillDone()Waits until done is set to true. -
allDone
public void allDone()Sets done to true.
-