Iterator iter = deliveries.iterator(); while (iter.hasNext()) { ref.incrementDeliveryCount(); iter.next(); }
   private Set getDeliveries(Receiver receiver, MessageReference ref)   {      Set deliveries = Collections.EMPTY_SET;            if (receiver == null)      {         if (log.isTraceEnabled()){ log.trace(this + " passing " + ref + " to router " + router); }         deliveries = router.handle(this, ref, null);      }      else      {         try         {            Delivery d = receiver.handle(this, ref, null);            if (d != null && !d.isCancelled())            {               deliveries = new HashSet(1);               deliveries.add(d);            }         }         catch(Throwable t)         {            // broken receiver - log the exception and ignore it            log.error("The receiver " + receiver + " is broken", t);         }      }            return deliveries;         }