Package org.jboss.messaging.core

Examples of org.jboss.messaging.core.Receiver


     
      int initial = target;

      while (true)
      {
         Receiver r = (Receiver)receiversCopy.get(target);

         try
         {
            Delivery d = r.handle(observer, ref, tx);

            if (trace) { log.trace("receiver " + r + " handled " + ref + " and returned " + d); }

            if (d != null)
            {
View Full Code Here


     
      boolean selectorRejected = false;

      for(Iterator i = receiversCopy.iterator(); i.hasNext(); )
      {
         Receiver receiver = (Receiver)i.next();

         try
         {
            Delivery d = receiver.handle(observer, ref, tx);

            if (trace) { log.trace("receiver " + receiver + " handled " + ref + " and returned " + d); }

            if (d != null)
            {
View Full Code Here

    * If a channel has a set a receiver and remove is called with a different receiver
    * need to ensure the receiver is not removed (since it doesn't match)
    */
   public void testRemoveDifferentReceiver() throws Exception
   {
      Receiver receiver1 = new SimpleReceiver();
     
      Receiver receiver2 = new SimpleReceiver();
     
      assertFalse(queue.iterator().hasNext());
     
      queue.add(receiver1);
     
View Full Code Here

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

      queue.deliver();
     
      Receiver r = new SimpleReceiver("ACKING", SimpleReceiver.ACKING);
     
      queue.add(r);
     
      queue.deliver();
   }
View Full Code Here

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

         queue.deliver();
        
         Receiver r = new SimpleReceiver("ACKING", SimpleReceiver.ACKING);
        
         queue.add(r);
        
         queue.deliver();
      }
View Full Code Here

   // Distributor tests ---------------------------------------------

   public void testAddOneReceiver()
   {
      Receiver r = new SimpleReceiver("ONE");

      assertTrue(queue.add(r));
      assertFalse(queue.add(r));

      assertTrue(queue.contains(r));
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.Receiver

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.