Package org.apache.camel.spi

Examples of org.apache.camel.spi.ExchangeFormatter


        this.useOriginalMessagePolicy = useOriginalMessagePolicy;
        this.retryWhilePolicy = retryWhile;
        this.executorService = executorService;

        if (ObjectHelper.isNotEmpty(redeliveryPolicy.getExchangeFormatterRef())) {
            ExchangeFormatter formatter = camelContext.getRegistry().lookupByNameAndType(redeliveryPolicy.getExchangeFormatterRef(), ExchangeFormatter.class);
            if (formatter != null) {
                this.exchangeFormatter = formatter;
            } else {
                throw new IllegalArgumentException("Cannot find the exchangeFormatter by using reference id " + redeliveryPolicy.getExchangeFormatterRef());
            }
        } else {
            // setup exchange formatter to be used for message history dump
            DefaultExchangeFormatter formatter = new DefaultExchangeFormatter();
            formatter.setShowExchangeId(true);
            formatter.setMultiline(true);
            formatter.setShowHeaders(true);
            formatter.setStyle(DefaultExchangeFormatter.OutputStyle.Fixed);
            this.exchangeFormatter = formatter;
        }
    }
View Full Code Here


            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
                localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
                if (localFormatter != null) {
                    exchangeFormatter = localFormatter;
                    setProperties(exchangeFormatter, parameters);
View Full Code Here

            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
                localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
                if (localFormatter != null) {
                    exchangeFormatter = localFormatter;
                    setProperties(exchangeFormatter, parameters);
View Full Code Here

            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
                localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
                if (localFormatter != null) {
                    exchangeFormatter = localFormatter;
                    setProperties(exchangeFormatter, parameters);
View Full Code Here

        } else {
            endpoint.setProvidedLogger(providedLogger);
        }

        // first, try to pick up the ExchangeFormatter from the registry
        ExchangeFormatter localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
        if (localFormatter != null) {
            setProperties(localFormatter, parameters);
        } else if (localFormatter == null && exchangeFormatter != null) {
            // do not set properties, the exchangeFormatter is explicitly set, thefore the
            // user would have set its properties explicitly too
View Full Code Here

            Long groupDelay = getAndRemoveParameter(parameters, "groupDelay", Long.class);
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), groupInterval, groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
                localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
                exchangeFormatter = localFormatter;
            }
            // if no formatter is available in the Registry, create a local one of the default type, for a single use
View Full Code Here

            endpoint.setProvidedLogger(providedLogger);
        }
      
        // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
        // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
        ExchangeFormatter localFormatter = exchangeFormatter;
        if (localFormatter == null) {
            localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
            if (localFormatter != null) {
                exchangeFormatter = localFormatter;
                setProperties(exchangeFormatter, parameters);
View Full Code Here

            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
                localFormatter = getCamelContext().getRegistry().lookupByNameAndType("logFormatter", ExchangeFormatter.class);
                if (localFormatter != null) {
                    exchangeFormatter = localFormatter;
                    setProperties(exchangeFormatter, parameters);
View Full Code Here

TOP

Related Classes of org.apache.camel.spi.ExchangeFormatter

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.