Package org.jboss.messaging.core.contract

Examples of org.jboss.messaging.core.contract.Delivery


           {
             Queue queue = (Queue)iter.next();
            
             if (trace) { log.trace(this + " Routing ref to queue " + queue); }
                       
             Delivery del = queue.handle(null, ref, tx);
            
             if (trace) { log.trace("Queue returned " + del); }

               if (del != null && del.isSelectorAccepted())
               {
                  routed = true;
                 
                  if (remoteSet != null)
                  {
View Full Code Here


      for(int i = 0; i < a.length; i++)
      {
         for(Iterator j = l.iterator(); j.hasNext(); )
         {
            Delivery d = (Delivery)j.next();
            MessageReference ref = d.getReference();

            if (a[i].getReference().getMessage().getMessageID() == ref.getMessage().getMessageID())
            {
               j.remove();
               break;
View Full Code Here

      SimpleReceiver r2 = new SimpleReceiver("TWO", SimpleReceiver.ACKING);
     
      queue.getLocalDistributor().add(r1);
      queue.getLocalDistributor().add(r2);
     
      Delivery d = queue.handle(observer, createReference(0, false, "payload"), null);
     
      List l1 = r1.getMessages();
      List l2 = r2.getMessages();
      if (l2.isEmpty())
      {
View Full Code Here

      SimpleReceiver r1 = new SimpleReceiver("ONE", SimpleReceiver.ACKING);
      SimpleReceiver r2 = new SimpleReceiver("TWO", SimpleReceiver.ACKING);
      assertTrue(queue.getLocalDistributor().add(r1));
      assertTrue(queue.getLocalDistributor().add(r2));

      Delivery d = queue.handle(observer, createReference(0, true, "payload"), null);

      List l1 = r1.getMessages();
      List l2 = r2.getMessages();
      if (l2.isEmpty())
      {
View Full Code Here

      MessageReference ref = createReference(0, false, "payload");
      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();

      // non-transacted send, non-reliable message, one message
      Delivery delivery = queue.handle(observer, ref, null);

      List stored = queue.browse(null);
      assertEquals(1, stored.size());

      Message sm = (Message)stored.iterator().next();
View Full Code Here

      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)
      {
         refs[i] = createReference(i, false, "payload" + i);

         // non-transacted send, non-reliable message, multiple messages
         Delivery delivery = queue.handle(observer, refs[i], null);
      }

      List stored = queue.browse(null);
      assertEqualSets(refs, stored);
View Full Code Here

      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();
     
      log.trace("ref is reliable:" + ref.getMessage().isReliable());

      // non-transacted send, reliable message, one message
      Delivery delivery = queue.handle(observer, ref, null);

      List stored = queue.browse(null);
      assertEquals(1, stored.size());

      Message sm = (Message)stored.iterator().next();
View Full Code Here

      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)
      {
         refs[i] = createReference(i, true, "payload" + i);

         // non-transacted send, reliable message, multiple messages
         Delivery delivery = queue.handle(observer, refs[i], null);
      }

      assertEqualSets(refs, queue.browse(null));

      SimpleReceiver receiver = new SimpleReceiver("ACKING", SimpleReceiver.ACKING);
View Full Code Here

      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)
      {
         refs[i] = createReference(i, false, "payload" + i);

         // non-transacted send, non-reliable message, multiple messages
         Delivery delivery = queue.handle(observer, refs[i], null);
      }

      assertTrue(queue.browse(null).isEmpty());

      List received = r.getMessages();
View Full Code Here

      MessageReference ref = createReference(0, true, "payload");
      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();

      // non-transacted send, reliable message, one message
      Delivery delivery = queue.handle(observer, ref, null);

      assertTrue(queue.browse(null).isEmpty());

      List received = r.getMessages();
      assertEquals(1, received.size());
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.contract.Delivery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.