Class DoneLatch

java.lang.Object
com.sun.ts.tests.jms.common.DoneLatch

public class DoneLatch extends Object
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 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.