Package org.apache.camel

Examples of org.apache.camel.Message.copyFrom()


    }

    private Message getMessageForResponse(Exchange exchange) {
        if (exchange.getPattern().isOutCapable()) {
            Message out = exchange.getOut();
            out.copyFrom(exchange.getIn());
            return out;
        }
       
        return exchange.getIn();
    }
View Full Code Here


    }

    private Message getMessageForResponse(Exchange exchange) {
        if (exchange.getPattern().isOutCapable()) {
            Message out = exchange.getOut();
            out.copyFrom(exchange.getIn());
            return out;
        }
       
        return exchange.getIn();
    }
View Full Code Here

        setBody(value);
    }

    public Message copy() {
        Message answer = newInstance();
        answer.copyFrom(this);
        return answer;
    }

    public void copyFrom(Message that) {
        if (that == this) {
View Full Code Here

        // copy out message
        if (source.hasOut()) {
            // exchange pattern sensitive
            Message resultMessage = source.getOut().isFault() ? result.getOut() : getResultMessage(result);
            resultMessage.copyFrom(source.getOut());
        }

        // copy exception
        result.setException(source.getException());
View Full Code Here

    }

    private Message getMessageForResponse(Exchange exchange) {
        if (exchange.getPattern().isOutCapable()) {
            Message out = exchange.getOut();
            out.copyFrom(exchange.getIn());
            return out;
        }

        return exchange.getIn();
    }
View Full Code Here

        if (in.getBody() != null) {
            Object value = in.getMandatoryBody(type);

            if (exchange.getPattern().isOutCapable()) {
                Message out = exchange.getOut();
                out.copyFrom(in);
                out.setBody(value);
            } else {
                in.setBody(value);
            }
        }
View Full Code Here

        // copy out message
        if (source.hasOut()) {
            // exchange pattern sensitive
            Message resultMessage = source.getOut().isFault() ? result.getOut() : getResultMessage(result);
            resultMessage.copyFrom(source.getOut());
        }

        // copy exception
        result.setException(source.getException());
View Full Code Here

        ResultHandler resultHandler = resultHandlerFactory.createResult(exchange);
        Result result = resultHandler.getResult();

        // lets copy the headers before we invoke the transform in case they modify them
        Message out = exchange.getOut();
        out.copyFrom(exchange.getIn());

        transformer.transform(source, result);
        resultHandler.setBody(out);
    }
View Full Code Here

    }

    private Message getMessageForResponse(Exchange exchange) {
        if (exchange.getPattern().isOutCapable()) {
            Message out = exchange.getOut();
            out.copyFrom(exchange.getIn());
            return out;
        }
       
        return exchange.getIn();
    }
View Full Code Here

        setBody(value);
    }

    public Message copy() {
        Message answer = newInstance();
        answer.copyFrom(this);
        return answer;
    }

    public void copyFrom(Message that) {
        setMessageId(that.getMessageId());
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.