Package org.jboss.messaging.core.contract

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


    * 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.getLocalDistributor().iterator().hasNext());
     
      queue.getLocalDistributor().add(receiver1);
     
View Full Code Here


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

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

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

      assertTrue(queue.getLocalDistributor().contains(r));
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.getLocalDistributor().iterator().hasNext());

      queue.getLocalDistributor().add(receiver1);

View Full Code Here

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

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

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

      assertTrue(queue.getLocalDistributor().contains(r));
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

     
      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

    * 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.getLocalDistributor().iterator().hasNext());

      queue.getLocalDistributor().add(receiver1);

View Full Code Here

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

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

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

      assertTrue(queue.getLocalDistributor().contains(r));
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.getLocalDistributor().iterator().hasNext());

      queue.getLocalDistributor().add(receiver1);

View Full Code Here

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

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

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

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

TOP

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