Package org.apache.camel

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


    public static Processor removeOutHeader(final String name) {
        return new Processor() {
            public void process(Exchange exchange) {
                Message out = exchange.getOut(false);
                if (out != null) {
                    out.removeHeader(name);
                }
            }

            @Override
            public String toString() {
View Full Code Here


            exchange.setException(e);
            callback.done(true);
            return true;
        } finally {
            // must remove headers as they were provisional
            in.removeHeader(Exchange.BEAN_MULTI_PARAMETER_ARRAY);
            in.removeHeader(Exchange.BEAN_METHOD_NAME);
        }

        if (invocation == null) {
            exchange.setException(new IllegalStateException("No method invocation could be created, no matching method could be found on: " + bean));
View Full Code Here

            callback.done(true);
            return true;
        } finally {
            // must remove headers as they were provisional
            in.removeHeader(Exchange.BEAN_MULTI_PARAMETER_ARRAY);
            in.removeHeader(Exchange.BEAN_METHOD_NAME);
        }

        if (invocation == null) {
            exchange.setException(new IllegalStateException("No method invocation could be created, no matching method could be found on: " + bean));
            callback.done(true);
View Full Code Here

        if (invocation == null) {
            throw new IllegalStateException("No method invocation could be created, no matching method could be found on: " + bean);
        }

        // remove temporary header
        in.removeHeader(Exchange.BEAN_MULTI_PARAMETER_ARRAY);

        Object value = null;
        try {
            AtomicBoolean sync = new AtomicBoolean(true);
            value = invocation.proceed(callback, sync);
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.