Ejemplo n.º 1
0
 @Override
 public void awaitSettlement(int... flags) throws MessagingException {
   _pending.waitUntilFalse();
   if (_state == DeliveryState.LINK_FAILED) {
     throw new MessagingException(
         "The link has failed due to the underlying network connection failure. The message associated with this delivery is in-doubt");
   }
 }
Ejemplo n.º 2
0
 @Override
 public void awaitSettlement(long timeout, TimeUnit unit, int... flags)
     throws MessagingException, TimeoutException {
   try {
     _pending.waitUntilFalse(unit.toMillis(timeout));
     if (_state == DeliveryState.LINK_FAILED) {
       throw new MessagingException(
           "The link has failed due to the underlying network connection failure. The message associated with this delivery is in-doubt");
     }
   } catch (ConditionManagerTimeoutException e) {
     throw new TimeoutException("The delivery was not settled within the given time period", e);
   }
 }
Ejemplo n.º 3
0
 void markLinkFailed() {
   _state = DeliveryState.LINK_FAILED;
   _pending.setValueAndNotify(false);
 }
Ejemplo n.º 4
0
 void markSettled() {
   _settled = true;
   _pending.setValueAndNotify(false);
 }