Package org.jboss.messaging.core

Examples of org.jboss.messaging.core.Delivery


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


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

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

      assertTrue(d.isDone());
      List l1 = r1.getMessages();
      List l2 = r2.getMessages();
      if (l2.isEmpty())
      {
         assertEquals(1, l1.size());
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);

      assertTrue(delivery.isDone());

      List stored = queue.browse();
      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);

         assertTrue(delivery.isDone());
      }

      List stored = queue.browse();
      assertEqualSets(refs, stored);
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);

      // the channel must not accept the message
      assertNull(delivery);

      assertTrue(queue.browse().isEmpty());
View Full Code Here

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

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

      assertTrue(delivery.isDone());

      List stored = queue.browse();
      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);

         // the channel must not accept the message
         assertNull(delivery);

         queue.deliver();
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);

         assertTrue(delivery.isDone());
      }

      assertEqualSets(refs, queue.browse());

      SimpleReceiver receiver = new SimpleReceiver("ACKING", SimpleReceiver.ACKING);
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);

      assertTrue(delivery.isDone());
      assertTrue(queue.browse().isEmpty());

      List received = r.getMessages();
      assertEquals(1, received.size());
      Message sm = (Message)received.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);

         assertTrue(delivery.isDone());
      }

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

      List received = r.getMessages();
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.