Package org.apache.camel.impl

Examples of org.apache.camel.impl.DefaultMessage.copyFrom()


        Message old = exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);
        exchange.setIn(msg);
    }

    @Override
View Full Code Here


        // use mandatory conversion
        Object value = in.getMandatoryBody(type);

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(in);
        msg.setBody(value);

        if (exchange.getPattern().isOutCapable()) {
            exchange.setOut(msg);
        } else {
View Full Code Here

        Message old = exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);
        exchange.setIn(msg);
    }

    @Override
View Full Code Here

        // use mandatory conversion
        Object value = in.getMandatoryBody(type);

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(in);
        msg.setBody(value);

        if (exchange.getPattern().isOutCapable()) {
            exchange.setOut(msg);
        } else {
View Full Code Here

        Message old = exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);
        exchange.setOut(msg);
    }

    @Override
View Full Code Here

        Message old = exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);
        exchange.setIn(msg);

        super.process(exchange);
    }
View Full Code Here

        Message old = exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);
        exchange.setIn(msg);
    }

    @Override
View Full Code Here

            Message old = exchange.getIn();

            // create a new message container so we do not drag specialized message objects along
            Message msg = new DefaultMessage();
            msg.copyFrom(old);
            msg.setBody(newBody);
            exchange.setOut(msg);
        } catch (Exception e) {
            exchange.setException(e);
        }
View Full Code Here

            boolean out = exchange.hasOut();
            Message old = out ? exchange.getOut() : exchange.getIn();

            // create a new message container so we do not drag specialized message objects along
            Message msg = new DefaultMessage();
            msg.copyFrom(old);
            msg.setBody(newBody);

            if (out) {
                exchange.setOut(msg);
            } else {
View Full Code Here

        boolean out = exchange.hasOut();
        Message old = out ? exchange.getOut() : exchange.getIn();

        // create a new message container so we do not drag specialized message objects along
        Message msg = new DefaultMessage();
        msg.copyFrom(old);
        msg.setBody(newBody);

        if (out) {
            exchange.setOut(msg);
        } else {
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.