Package org.jboss.soa.esb.couriers

Examples of org.jboss.soa.esb.couriers.Courier


    call.setMessageID(new URI(UUID.randomUUID().toString()));

    Message message = MessageFactory.getInstance().getMessage();
    message.getHeader().setCall(call);
    message.getBody().add("Hello World".getBytes());
    Courier courier = CourierFactory.getCourier(call.getTo());

    courier.deliver(message);
  }
View Full Code Here


           
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
                    CourierUtil.cleanCourier(courier);
                }
            }
        } else {
View Full Code Here

            }
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
                    CourierUtil.cleanCourier(courier);
                }
            }
        } else {
View Full Code Here

            } catch (MessageDeliverException e) {
                LOGGER.error("Failed to send " + messageType + " to address " + epr
                        + " for message "+message.getHeader(), e);
            }
        } else {
            Courier courier = null;

            try {
                courier = CourierFactory.getCourier(epr);
                courier.deliver(message);
            } catch (final CourierException e) {
                LOGGER.error("Failed to send " + messageType + " to address " + epr
                        + " for message " + message.getHeader(), e);
            } catch (final MalformedEPRException e) {
                LOGGER.error("Failed to send " + messageType + " to address " + epr
View Full Code Here

        throw new CourierException(e);
      }
      call.setMessageID(uri);
    }
   
    Courier sender = CourierFactory.getCourier(call.getTo());
                PickUpOnlyCourier receiver = null;
                try
                {
                        boolean waitForResponse = (maxWaitMillis > 0);
                        if (waitForResponse)
                        {
                                if (null==call.getReplyTo())
                                        call.setReplyTo(DefaultReplyTo.getReplyTo(call.getTo()));
                                receiver        = CourierFactory.getPickupCourier(call.getReplyTo());
                        }
                       
                        sender.deliver(outgoing);
                        return (waitForResponse ? receiver.pickup(maxWaitMillis) : null) ;
                }
                finally
                {
                    CourierUtil.cleanCourier(sender) ;
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.couriers.Courier

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.