Examples of pickup()


Examples of org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier.pickup()

        response.getBody().add(text_2.getBytes());
        CourierUtil.deliverMessage(response);

        // try to pick up reply
        PickUpOnlyCourier waiter = CourierFactory.getPickupCourier(replyToEpr);
        Message finalMsg = waiter.pickup(100);
        assertTrue(text_2.equals(new String((byte[]) finalMsg.getBody().get())));

        _logger.info(text_2+"... and back from jdbc ReplyTo EPR");
        _logger.info("getDefaultReplyToEpr test succeeded for JDBC message transport");
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    epr.setInputSuffix(".esbMessage");
    epr.setPostDelete(true);
    TwoWayCourier courier = CourierFactory.getPickupCourier(epr);

    Message message = null;
    while (null != (message = courier.pickup(100)))
      System.out.println(message.getHeader().getCall().getMessageID());
  }

  private final void deliver (String url) throws Exception
  {
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    FileEpr fromEpr = new FileEpr(toEpr.getURI());
    fromEpr.setInputSuffix(TEST_SUFFIX);
    fromEpr.setPostSuffix(DONE_SUFFIX);
   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);
    Message retrieved = pickUp.pickup(1000);
    Assert.assertFalse("Null message retrieved",null==retrieved);
   
    String back = new String((byte[]) retrieved.getBody().get());
    Assert.assertEquals(contents,back);
    _logger.info("Contents of retrieved msg equal original text <"+back+">");
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);

    try
    {
        Message retrieved = pickUp.pickup(1000);
        _logger.info(retrieved);
        Assert.fail();
    }
    catch (FaultMessageException ex)
    {
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    FileEpr fromEpr = new FileEpr(toEpr.getURI());
    fromEpr.setInputSuffix(TEST_SUFFIX);
    fromEpr.setPostSuffix(DONE_SUFFIX);
   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);
    Message retrieved = pickUp.pickup(1000);
    Assert.assertFalse("Null message retrieved",null==retrieved);
   
    String back = new String((byte[]) retrieved.getBody().get());
    Assert.assertEquals(contents,back);
    _logger.info("Contents of retrieved msg equal original text <"+back+">");
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    fromEpr.setInputSuffix(TEST_SUFFIX);
    // setting postdelete to true will delete input Message files, if they were picked up
    fromEpr.setPostDelete(true);
   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);
    Message retrieved = pickUp.pickup(1000);
    Assert.assertFalse("Null message retrieved",null==retrieved);
   
    String back = new String((byte[]) retrieved.getBody().get());
    Assert.assertEquals(contents,back);
    _logger.info("Contents of retrieved msg equal original text <"+back+">");
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    fromEpr.setErrorSuffix(ERROR_SUFFIX);
    // Don't delete - default is to delete files in error
    fromEpr.setErrorDelete(false);
   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);
    Message retrieved = pickUp.pickup(1000);
    Assert.assertTrue("Null message retrieved",null==retrieved);
   
    theFile = new File(_tmpDir,uid+TEST_SUFFIX+ERROR_SUFFIX);
    Assert.assertTrue(theFile.exists());
    _logger.info("Message file properly renamed to "+theFile.toString());
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

    fromEpr.setPostSuffix(DONE_SUFFIX);
    fromEpr.setErrorSuffix(ERROR_SUFFIX);
    // Not using setErrorDelete(false) should delete files in error
   
    TwoWayCourier pickUp = CourierFactory.getPickupCourier(fromEpr);
    Message retrieved = pickUp.pickup(1000);
    Assert.assertTrue("Null message retrieved",null==retrieved);
   
    FileFilter ff = new FileFilter()
    { public boolean accept(File file)
      {return file.getName().startsWith(uid); }
View Full Code Here

Examples of org.jboss.soa.esb.couriers.TwoWayCourier.pickup()

                            // JBESB-1016 replyToEPR has to be non-null or we'd have dropped out by this point!

                            // do we need to do this for synchronous calls? Vagueries of Couriers?

                            courier.setReplyToEpr(replyToEPR);
                            final Message response = courier.pickup(timeout);
                            if (response == null) {
                                throw new ResponseTimeoutException("No response received within timeout period") ;
                            }
                            return response ;
                        } else {
View Full Code Here

Examples of rinde.sim.core.model.pdp.PDPModel.pickup()

      } else {
        // it is still available, go there as fast as possible
        rm.moveTo(this, curr.get(), time);
        if (rm.equalPosition(this, curr.get())) {
          // pickup customer
          pm.pickup(this, curr.get(), time);
        }
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.