Package org.jboss.messaging.core

Examples of org.jboss.messaging.core.Delivery


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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

View Full Code Here


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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

      SimpleReceiver receiver =
View Full Code Here

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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

      SimpleReceiver receiver =
View Full Code Here

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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

View Full Code Here

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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

      SimpleReceiver receiver =
View Full Code Here

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

      // non-recoverable channel, non-reliable message
      Delivery delivery = queue.handle(observer, ref, null);
      assertTrue(delivery.isDone());

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

      SimpleReceiver receiver =
View Full Code Here

         Iterator iter = dels.iterator();

         while (iter.hasNext())
         {
            Delivery del = (Delivery) iter.next();

            try
            {
               del.acknowledge(null);
            }
            catch (Throwable t)
            {
               //Ignore
            }
View Full Code Here

   {
      Message msg = CoreMessageFactory.createCoreMessage(nextId++, false, null);     
     
      MessageReference ref = ms.reference(msg);        
     
      Delivery del = router.handle(null, ref, null);
     
      assertNotNull(del);
     
      assertTrue(del.isSelectorAccepted());
           
      Thread.sleep(250);
     
      List msgs = receiver.getMessages();
     
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

      MessageReference ref2 = ms.reference(m2);
      MessageReference ref3 = ms.reference(m3);
      MessageReference ref4 = ms.reference(m4);
      MessageReference ref5 = ms.reference(m5);
     
      Delivery del = queue.handle(null, ref1, null);
      assertFalse(del.isSelectorAccepted());
     
      del = queue.handle(null, ref2, null);
      assertFalse(del.isSelectorAccepted());
     
      del = queue.handle(null, ref3, null);
      assertTrue(del.isSelectorAccepted());
     
      del = queue.handle(null, ref4, null);
      assertFalse(del.isSelectorAccepted());
     
      del = queue.handle(null, ref5, null);
      assertFalse(del.isSelectorAccepted());
   }
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.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.