Package javax.jbi.messaging

Examples of javax.jbi.messaging.DeliveryChannel.send()


                        String str = getTransformer().contentToString(me.getFault());
                        getTransformer().toResult(new StringSource(str), result);
                        Element e = result.getDocument().getRootElement();
                        e = (Element) e.clone();
                        me.setStatus(ExchangeStatus.DONE);
                        channel.send(me);
                        XFireFault xfireFault = new XFireFault(str, XFireFault.RECEIVER);
                        xfireFault.getDetail().addContent(e);
                        throw xfireFault;
                    } else if (me.getMessage("out") != null) {
                        Source outSrc = me.getMessage("out").getContent();
View Full Code Here


                    } else if (me.getMessage("out") != null) {
                        Source outSrc = me.getMessage("out").getContent();
                        InMessage inMessage = new InMessage(getTransformer().toXMLStreamReader(outSrc), getUri());
                        getEndpoint().onReceive(context, inMessage);
                        me.setStatus(ExchangeStatus.DONE);
                        channel.send(me);
                    }
                }
            } catch (XFireException e) {
                throw e;
            } catch (Exception e) {
View Full Code Here

            InOnly inonly = factory.createInOnlyExchange();
            inonly.setService(ReceiverComponent.SERVICE);
            NormalizedMessage msg = inonly.createMessage();
            msg.setContent(src);
            inonly.setInMessage(msg);
            channel.send(inonly);
        }
       
        public Source twoWay(Source src) throws Exception {
            DeliveryChannel channel = context.getDeliveryChannel();
            MessageExchangeFactory factory = channel.createExchangeFactory();
View Full Code Here

            msg.setContent(src);
            inout.setInMessage(msg);
            channel.sendSync(inout);
            Source outSrc = inout.getOutMessage().getContent();
            inout.setStatus(ExchangeStatus.DONE);
            channel.send(inout);
            return outSrc;
        }
    }
   
}
View Full Code Here

                channel.sendSync(exchange);
                throw new XFireFault("No response", XFireFault.SENDER);
            }                   
            Source src = exchange.getOutMessage().getContent();
            exchange.setStatus(ExchangeStatus.DONE);
            channel.send(exchange);
            src = transformer.toDOMSource(src);
            return src;
        } catch (XFireFault e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

                Fault f = me.getFault();
                Fault of = exchange.createFault();
                exchange.setFault(of);
                getMessageTransformer().transform(exchange, f, of);
            }
            channel.send(exchange);
            done(me);
        }
       
    }
View Full Code Here

          MimeMessage mailMsg = (MimeMessage) folder.getMessage(i);
          InOnly io = mef.createInOnlyExchange();
          NormalizedMessage normalizedMessage = io.createMessage();
          this.marshaler.prepareExchange(io,normalizedMessage,mailMsg);
          io.setInMessage(normalizedMessage);
          channel.send(io);
            mailMsg.setFlag(Flags.Flag.DELETED,true);
        }
    } finally {
      try {
        if (folder != null) {
View Full Code Here

            exchange.setInMessage(message);

            message.setProperty("id", new Integer(i));
            message.setContent(new StringSource("<example id='" + i + "'/>"));

            deliveryChannel.send(exchange);
        }
    }

    // ComponentLifeCycle interface
    //-------------------------------------------------------------------------
View Full Code Here

                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                LOGGER.info("sync send on deliverychannel: {}", deliveryChannel);
                if (sync) {
                    deliveryChannel.sendSync(exchange);
                } else {
                    deliveryChannel.send(exchange);
                }
            }
        } else {
            LOGGER.warn("No endpoints available for interface: {}", interfaceName);
        }
View Full Code Here

                me.setProperty(name, exchange.getProperty(name));
            }
            if (Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC))) {
                channel.sendSync(me);
            } else {
                channel.send(me);
            }
        }
    }

    public String getFlowName() {
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.